Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.
FIREBASE SET UP
- Go to Firebase.com and Login
- Go to the Firebase Console Create New Project and Name it
- To add Firebase to your APP click on Add Firebase to your Android app
- Enter your project package name and click on ADD APP button to register your app
- Download the google-services.json file and paste it in the app folder
SENDING NOTIFICATION MESSAGE
-
Go to Firebase Console and click on your project
-
Now from the Grow Menu on the left side bar, click on Notifications
- Now click on SEND YOUR FIRST MESSAGE button
- Enter the notification message, select your app from the dropdown and click on SEND MESSAGE button
- Now you should receive your first notification on your device