GH-480 (android): Add option to open system's browser in a new task #791
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms affected
Android
Motivation and Context
When opening external app with inAppBrowser using target:
_system
, sometimes we lose the ability to go back to the initial app, as described in #480Closes #480
Closes #735
Description
This PR add an option
launchInNewTask
which, when used with target:_system
on android, add the flagIntent.FLAG_ACTIVITY_NEW_TASK
to the Intent used to launch system's browser.Testing
I have an (proprietary) ionic/cordova app where I encountered this issue when opening
geo:
url with InAppBrowser.I checked that the issue is still here when I don't add the new option
launchInNewTask
, and that this issue is gone when I addlaunchInNewTask=yes
to the options.I didn't add any new automated tests - not sure how.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)