-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Description
Feature Request
Motivation Behind Feature
Invoking locally installed app in any launch mode based on the app thats getting invoked.
Feature Description
There should be a plugin level config to open another app from current app in different launch mode. We can currently do that by specifying launch mode at app level in config.xml but that applies to the entire app and not just for inappbrowser plugin.
Alternatives or Workarounds
Currently when from App 1 if I open App 2 which is locally installed on the system using below method it opens it on top of the current app and app1 becomes hidden n inaccessible:
this.inAppBrowser.create(url, '_system')
I have done a temp work around which might not be correct in android source code for the plugin as below to open app2 in new task always (Keeping my app1 launch mode to singleTop itself)
`private void openExternalExcludeCurrentApp(Intent intent) {
// If the current app package isn't a target for this URL, then use
// the normal launch behavior
if (hasCurrentPackage == false || targetIntents.size() == 0) {
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // added this line
this.cordova.getActivity().startActivity(intent);
}
thomasletallec, WalterMourao and webschik
Metadata
Metadata
Assignees
Labels
No labels