mirror of
https://github.com/lampaa/com.lampa.startapp.git
synced 2026-05-20 00:01:31 +08:00
introduce 'go' method for iOS to launch app without calling canOpenURL for unwhitelisted custom schemes
This commit is contained in:
+14
-11
@@ -43,17 +43,20 @@ public class startApp extends CordovaPlugin {
|
||||
if (action.equals("start")) {
|
||||
this.start(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("check")) {
|
||||
this.check(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("getExtras")) {
|
||||
this.getExtras(callbackContext);
|
||||
}
|
||||
else if(action.equals("getExtra")) {
|
||||
this.getExtra(args, callbackContext);
|
||||
}
|
||||
|
||||
return true;
|
||||
else if (action.equals("go")) {
|
||||
this.start(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("check")) {
|
||||
this.check(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("getExtras")) {
|
||||
this.getExtras(callbackContext);
|
||||
}
|
||||
else if(action.equals("getExtra")) {
|
||||
this.getExtra(args, callbackContext);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -40,6 +40,12 @@ module.exports = {
|
||||
errorCallback = errorCallback || function() {};
|
||||
|
||||
exec(completeCallback, errorCallback, "startApp", "check", output);
|
||||
},
|
||||
go: function(completeCallback, errorCallback) {
|
||||
completeCallback = completeCallback || function() {};
|
||||
errorCallback = errorCallback || function() {};
|
||||
|
||||
exec(completeCallback, errorCallback, "startApp", "go", output);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -41,6 +41,12 @@ module.exports = {
|
||||
errorCallback = errorCallback || function() {};
|
||||
|
||||
exec(completeCallback, errorCallback, "startApp", "check", output);
|
||||
},
|
||||
go: function(completeCallback, errorCallback) {
|
||||
completeCallback = completeCallback || function() {};
|
||||
errorCallback = errorCallback || function() {};
|
||||
|
||||
exec(completeCallback, errorCallback, "startApp", "go", output);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user