GoogleChrome / android-browser-helper

The Android Browser Helper library helps developers use Custom Tabs and Trusted Web Activities on top of the AndroidX browser support library.
Apache License 2.0
694 stars 288 forks source link

PWA app don't show when we start it from another app with function startActivity and flag FLAG_ACTIVITY_SINGLE_TOP #475

Open marcinj opened 3 months ago

marcinj commented 3 months ago

Describe the bug PWA app don't show when we start it from another app with function startActivity and flag FLAG_ACTIVITY_SINGLE_TOP. PWA app start, then restart restartInNewTask(), but Android don't show it.

To Reproduce Steps to reproduce the behavior:

  1. Start pwa app from another app with function startActivity and flag FLAG_ACTIVITY_SINGLE_TOP

Expected behavior Application show browser when start.

Did this ever used to work No

Screenshots None

Code Snippets

Code to run pwa app from another app:

final Intent intent = manager.getLaunchIntentForPackage(packageName);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(intent);

PWA demo app build with generator from: https://www.pwabuilder.com/reportcard?site=https://webboard.app

Smartphone (please complete the following information):

Additional context None