-
Notifications
You must be signed in to change notification settings - Fork 505
[Bug] [Android] Browser.OpenAsync creates new task #1180
Comments
When this is fixed it would probably also fix #798. |
Hmmmmm yes, I agree with you here as I never did this before... Curious why this was put in... Here is my old code: https://github.com/jguertl/SharePlugin/blob/master/Share/Share.Plugin.Android/ShareImplementation.cs#L41 |
Although I guess what would happen if you are on a dual screen device and you want it to launch on the second screen... that flag would need to be there.... |
The flag would indeed be required to launch it on a second screen (or in multi window mode). |
* Don't launch new task on custom tabs. * Android Set custom tabs flags for appcontext * Added BrowserLaunchFlags This can be a place to expose some platform specific isms. For now on Android we have a `PrefereAdjacent` and on iOS a `PreferModal`. * Added present sheet options, sample * Use flags in sample * Cleanup API a little bit and add docs Co-authored-by: Jonathan Dick <jodick@microsoft.com> Co-authored-by: Jonathan Dick <jondick@gmail.com>
Fixed in #1183 |
Description
The implementation of
Browser.OpenAsync
is always starting a new task for the CustomTabs:Essentials/Xamarin.Essentials/Browser/Browser.android.cs
Line 30 in 9e74d1c
This means the users will see the CustomTab as a separate app in their recent apps list and won't return to the app when they switch between apps.
Steps to Reproduce
Browser.OpenAsync
withBrowserLaunchMode.SystemPreferred
You will notice that the CustomTab and the test app are both in the list.
But we'll select the CustomTab since that is where we left off.
Expected Behavior
After closing the CustomTab in step 4 you should return to the test app.
Actual Behavior
After closing the CustomTab in step 4 you return to the home screen.
It looks like the app crashed but it is actually just in the background in another task.
Basic Information
The text was updated successfully, but these errors were encountered: