Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[Bug] [Android] Browser.OpenAsync creates new task #1180

Closed
@rickclephas

Description

Description

The implementation of Browser.OpenAsync is always starting a new task for the CustomTabs:

var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;

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

  1. Call Browser.OpenAsync with BrowserLaunchMode.SystemPreferred
  2. When the CustomTab is open switch to another app (without closing the CustomTab)
  3. Now switch back to the CustomTab via the recent apps.
    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.
  4. Close the CustomTab

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

  • Version with issue: 1.5.1
  • Platform Target Frameworks:
    • Android: 10
  • Affected Devices:
    • Google Pixel 3a XL
    • Samsung Galaxy S20+
    • Presumably every other device as well

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions