Allow multiple tasks for command_webview
#4307
Merged
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.
Summary
'Fix' #3343 by allowing
command_webview
to create multiple, new tasks. This allows launching the webview to work reliably irrespective of how the app was originally started.While this behavior may not be perfect in my opinion (you end up with hidden tasks which can be unpredictable), all app features that allow you to navigate to a specific page the webview such as shortcuts, tapping on notifications, device controls long press, etc. use this to reliably load the frontend with a specific page. Different behavior for this specific feature (which as a result didn't always work) doesn't make a lot of sense.
Screenshots
n/a
Link to pull request in Documentation repository
Docs don't mention anything about tasks/recents so let's not complicate things
Any other notes
Based on these specific reproduction steps, without this change:
command_webview
, it seems to bring the existing activity to the front and that's itThere must be something here with task stacks/affinity different for launch vs webview as the 'root' that allowed it to work without requiring the multiple tasks flag. I've also tried checking the intent extras in
onNewIntent
for the second point, but it didn't call the function.