I am working on implementation of web push notifications using FCM library. I have created a service worker file in the root folder of the domain and another js file in the Project to show web push notifications.
The web push notifications are working fine and showing up in the browser. According to the documentation a manifest.json with a gcm sender id is required in the root folder. I have not created this web app manifest file, but still I can see the notifications in the Chrome browser.
Could anyone clarify why exactly is manifest.json required.
For Chrome to route FCM messages to the correct service worker, it needs to know the Sender ID
Have a look at these pages:
https://developers.google.com/web/fundamentals/push-notifications/ https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With