2

Current behaviour: When the user clicks the push notification the web app open, even if the TWA app is installed in the android phone.

Expected behaviour: When the user clicks the push notification I want to open the TWA (Trusted web activity) app.

I am using Firebase for push notification

I just using google's sample repo (https://github.com/GoogleChromeLabs/svgomg-twa) as my base and overwriting it.

the URL I am trying to open when the user clicks the notification is similar to https://dev.example.com/

this is my AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/appName" android:supportsRtl="true" android:theme="@style/Theme.LauncherActivity"> <meta-data android:name="asset_statements" android:resource="@string/assetStatements" /> <meta-data android:name="cros_web_alternative" android:value="@string/crosLaunchUrl" /> <activity android:name="android.support.customtabs.trusted.LauncherActivity" android:label="@string/appName"> <meta-data android:name="android.support.customtabs.trusted.DEFAULT_URL" android:value="@string/launchUrl" /> <meta-data android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR" android:resource="@color/colorPrimary" /> <meta-data android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR" android:resource="@color/navigationColor" /> <meta-data android:name="android.support.customtabs.trusted.SPLASH_IMAGE_DRAWABLE" android:resource="@drawable/splash"/> <meta-data android:name="android.support.customtabs.trusted.SPLASH_SCREEN_BACKGROUND_COLOR" android:resource="@color/backgroundColor"/> <meta-data android:name="android.support.customtabs.trusted.SPLASH_SCREEN_FADE_OUT_DURATION" android:value="@integer/splashScreenFadeOutDuration"/> <meta-data android:name="android.support.customtabs.trusted.FILE_PROVIDER_AUTHORITY" android:value="@string/providerAuthority"/> <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="https" android:host="@string/hostName"/> </intent-filter> </activity> <provider android:name="android.support.v4.content.FileProvider" android:authorities="@string/providerAuthority" android:grantUriPermissions="true" android:exported="false"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/filepaths" /> </provider> <service android:name="android.support.customtabs.trusted.TrustedWebActivityService" android:enabled="@bool/enableNotification" android:exported="@bool/enableNotification"> <intent-filter> <action android:name="android.support.customtabs.trusted.TRUSTED_WEB_ACTIVITY_SERVICE"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </service> </application> </manifest> 
3
  • Could you add the AndroidManifest.xml to the issue and also more details on the URL that is being opened when the user clicks on the push notification? Commented Jan 29, 2020 at 16:41
  • @andreban update the question with the details you asked for. Commented Jan 30, 2020 at 9:59
  • All looks right in the manifest. Would you be able to share the APK (or the link to the store if it has been uploaded to Play?) Commented Jan 31, 2020 at 11:16

2 Answers 2

3

This seems to be a bug that was introduced in Chrome 80.

Check this chromium bug out for more details: https://bugs.chromium.org/p/chromium/issues/detail?id=1052288

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks to this comment, we have reached the issue! Thank you!It may be better to wait for the next Chrome version because it seems to be fixed!
This should be fixed in Chrome 81. It may be worth testing agains Chrome Beta or Chrome Dev to confirm it works for you until its stable
0

I'm sorry.

I happened to do that too. Probably from Chrom80.

So delete the comment.

1 Comment

I'm sorry. I happened to do that too. Probably from Chrom80.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.