mshaikh7 opened a new issue #735:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/735


   # 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);
           }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to