|
|
|
@ -35,7 +35,6 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.github.rosjava.android_remocons.common_tools.rocon;
|
|
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
|
|
|
import android.content.ActivityNotFoundException;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
@ -268,7 +267,10 @@ public class AppLauncher {
|
|
|
|
|
// Validate the URL before starting anything
|
|
|
|
|
String app_name = "";
|
|
|
|
|
app_name = app.getName();
|
|
|
|
|
Log.i("app_name:", app_name);
|
|
|
|
|
//没有调用到appURL,第273行注释掉了。by lcp
|
|
|
|
|
URL appURL = new URL(app_name);
|
|
|
|
|
Log.i("successfully URL:",app_name);
|
|
|
|
|
//2014.12.03 comment by dwlee
|
|
|
|
|
//reason of blocking, Not necessary in web app launcher.
|
|
|
|
|
/*
|
|
|
|
@ -299,15 +301,17 @@ public class AppLauncher {
|
|
|
|
|
// Create an action view intent and pass rapp's name + extra information as URI
|
|
|
|
|
Intent intent = new Intent(Intent.ACTION_VIEW, appURI);
|
|
|
|
|
intent.putExtra(Constants.ACTIVITY_SWITCHER_ID + "." + InteractionMode.CONCERT + "_app_name",app_name);
|
|
|
|
|
|
|
|
|
|
Log.i("AppLaunch", "trying to start web app (URI: " + appUriStr + ")");
|
|
|
|
|
parent.startActivity(intent);
|
|
|
|
|
return Result.SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
|
/**
|
|
|
|
|
* 没有用到url,直接注释掉. by lcp 2021/4/20
|
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
|
{//rocon app的no protocol bug
|
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage() + " It's in launchUrl.");
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
|
|
return Result.NOT_INSTALLED.withMsg("Activity not found for view action??? muoia???");
|
|
|
|
@ -329,7 +333,7 @@ public class AppLauncher {
|
|
|
|
|
String app_type = "web_url";
|
|
|
|
|
app_name = app.getName().substring(app_type.length()+1,app.getName().length()-1);
|
|
|
|
|
|
|
|
|
|
URL appURL = new URL(app_name);
|
|
|
|
|
//URL appURL = new URL(app_name);
|
|
|
|
|
|
|
|
|
|
//2014.12.03 comment by dwlee
|
|
|
|
|
//reason of blocking, Not necessary in web app launcher.
|
|
|
|
@ -366,10 +370,12 @@ public class AppLauncher {
|
|
|
|
|
parent.startActivity(intent);
|
|
|
|
|
return Result.SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
|
{
|
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage() + " It's in launchWebUrl.");
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
|
|
return Result.NOT_INSTALLED.withMsg("Activity not found for view action??? muoia???");
|
|
|
|
|