Skip to content Skip to sidebar Skip to footer

Fcm: Device Receives Only One Of Multiple Notification Messages

I am currently writing an Android app using Flutter and a Node.js backend. On the client side, I followed the first 3 steps of the firebase_messaging docs to integrate FCM into my

Solution 1:

With the help of BigQuery I found out where the problem lies: All messages have an identical collapse_key (the app name). Thus, if I can't receive any messages on my device at the time the server sends the messages (for example, when I'm not connected to the Internet), the messages are collapsed and I only get one message (the last message sent). This behavior seems to be intented for notification messages:

Non-collapsible and collapsible messages (FCM Docs):

Except for notification messages, all messages are non-collapsible by default.

Apparently there is no straightforward solution to this problem. FCM only supports four different collapse_keys at a time, so I can't just give each message a different collapse_key, since then I'd only get four messages at most.

I probably have to use a workaround by sending data messages and then creating the proper push notifications on the client side.


Related: How to make a GCM / FCM notification-type message non-collapsible

Post a Comment for "Fcm: Device Receives Only One Of Multiple Notification Messages"