Monday, April 29, 2019

Adding Push-Notification to a React Web App With Firebase Cloud Messaging

We will create an MVP of an app on React that will receive push notifications by using Firebase Cloud Messaging (even in the background mode or when the app is closed). This is an easy thing to do but there are certain moments to watch for. You can find all the needed keys/tokens described below in the Firebase settings of the project.

Adding manifest.json

Add a manifest.json file to the folder that already has an index.html file with  gcm_sender_id. If you already have the manifesto, simply add this line. Insert the value below as is, without changing anything.



from DZone.com Feed http://bit.ly/2XSXhuC

No comments:

Post a Comment