5

I'm currently working on publishing my PWA to Play Store; and stuck with Notifications. My TWA makes use of Firebase Push Notifications for Web - and they work fine. The only issue is that user must opt-in to the notifications when using PWA.

However, I'd like to enable notifications automatically whenever user downloads my TWA app from Play Store; and I couldn't find any relevant section in Google's TWA tutorials.

I have zero knowledge of Android development but I'm following tutorials by Google and got the TWA working on my mobile, minus the push notifications.

Can someone point me in the right direction?

TheBigK
  • 451
  • 5
  • 17
  • Can you give us more insights on how your app is configured? Have you used something like Bubblewrap or PWA Builder to create it or are you using Android Studio directly? If you are using Android Studio, are you using the LauncherActivity that comes with the support library? – andreban May 20 '20 at 16:46
  • I've followed this tutorial - https://codelabs.developers.google.com/codelabs/getting-started-with-twas/index.html?index=..%2F..index#0 . I'm looking at the Bubblewrap "Quick-Start" tutorial; but it doesn't talk about Notifications integration either. – TheBigK May 21 '20 at 03:14
  • 1
    When using Bubblewrap, after running `init`, you can edit `twa-manifest.json` and set `"enableNotifications": true`. Then, run `bubblewrap update` to update the project files and `bubblewrap build` to build the app. – andreban May 21 '20 at 09:26
  • Does the bubblewrap build pick up the notification icons on its own from my PWA manifest? – TheBigK May 22 '20 at 11:07
  • 1
    not yet: https://github.com/GoogleChromeLabs/bubblewrap/issues/180 – andreban May 22 '20 at 16:32
  • @TheBigK did you find any solution to it? – Sppidy Nov 15 '20 at 21:04
  • @TheBigK I am also stuck at the same thin. I can manually activate the web push notifications on my TWA but that was not the point, I want to have them automatically but there is no documentation (that I can find) about that use case. – Sead Oct 12 '21 at 09:56

0 Answers0