Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
1.You can notify a client app that new email or other data is available to sync.
2.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.
Detailed information on Firebase Cloud Messaging can be found in here: https://firebase.google.com/docs/cloud-messaging/
But there are some situations where we need to fix the issues related to FCM push notifications such as:
1.Notification is not working in the Oreo.
2.Notification is not working as a background service in One plus 3/3T.
In situation one, Oreo, the latest version of Android, supports some methods and classes which are not used by the legacy code present in the application.
The below mentioned line of code snippet will help you fix it.
In situation two, where the notification is not working as a background service in One plus 3/3T, turn your battery optimisation off and it’s done. You will now receive the push notification.