Handle FCM messages on Android
Blog post from Firebase
Firebase Cloud Messaging (FCM) supports notification messages and data messages, which differ in priority, system handling, and app responsibilities on modern Android. Notification messages are high priority by default and are displayed by the Android system when an app is in the background, while foreground apps receive them through `onMessageReceived()` to update content or post a notification; associated data can be read from the launch intent if the user taps the notification, but not if it is dismissed. Data messages are normal priority by default and may be deferred during Doze mode, but they allow apps to decrypt payloads, customize notifications, and process content directly in `onMessageReceived()`. Because the callback has roughly 20 seconds to complete, apps should display an initial notification promptly, save or update local content, and use WorkManager or scheduled jobs for additional network work exceeding the 4 KB payload limit. Developers should also account for unordered delivery of non-collapsible messages and test FCM behavior against Android power-management features. The post recommends migrating to FCM, as C2DM was retired and Google Cloud Messaging APIs were deprecated.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.