|
|
@ -124,7 +124,7 @@ public class AppLauncher {
|
|
|
|
static public AppType checkAppType(String app_name){
|
|
|
|
static public AppType checkAppType(String app_name){
|
|
|
|
String web_url_desc = "web_url(";
|
|
|
|
String web_url_desc = "web_url(";
|
|
|
|
String web_app_desc = "web_app(";
|
|
|
|
String web_app_desc = "web_app(";
|
|
|
|
if (Patterns.WEB_URL.matcher(app_name).matches() == true) {
|
|
|
|
if (Patterns.WEB_URL.matcher(app_name).matches()) {
|
|
|
|
return AppType.URL;
|
|
|
|
return AppType.URL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(app_name.length() == 0){
|
|
|
|
else if(app_name.length() == 0){
|
|
|
@ -263,7 +263,7 @@ public class AppLauncher {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static private Result launchUrl (final Activity parent, final RoconDescription concert,
|
|
|
|
static private Result launchUrl (final Activity parent, final RoconDescription concert,
|
|
|
|
final rocon_interaction_msgs.Interaction app) {
|
|
|
|
final rocon_interaction_msgs.Interaction app) {
|
|
|
|
try
|
|
|
|
try //rocon app的bug在这个方法中
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Validate the URL before starting anything
|
|
|
|
// Validate the URL before starting anything
|
|
|
|
String app_name = "";
|
|
|
|
String app_name = "";
|
|
|
@ -305,8 +305,8 @@ public class AppLauncher {
|
|
|
|
return Result.SUCCESS;
|
|
|
|
return Result.SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
{
|
|
|
|
{//rocon app的no protocol bug
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage());
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage() + " It's in launchUrl.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
@ -368,7 +368,7 @@ public class AppLauncher {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage());
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage() + " It's in launchWebUrl.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
@ -476,7 +476,7 @@ public class AppLauncher {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
catch (MalformedURLException e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage());
|
|
|
|
return Result.MALFORMED_URI.withMsg("App URL is not valid. " + e.getMessage() + " It's in launchWebApp.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
catch (ActivityNotFoundException e) {
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
|
// This cannot happen for a web site, right? must mean that I have no web browser!
|
|
|
|