It is possible. Two approaches.
First, you use the collapse_key parameter to set the message as a discarded message. Referring to FCM Documents :
A discarded message is a message that can be replaced with a new message containing the same collapse key if it has not yet been delivered to the device.
It is really included in the link you specified (the first parameter in the Parameters section):
collapse_key . This parameter identifies a group of messages (for example, with collapse_key: "Available Updates") that can be minimized so that only the last message can be sent when sending. This is done so as not to send too many identical messages when the device returns to the network or becomes active.
Please note that there is no guarantee which order is shipped.
Note. At any given time, a maximum of 4 different camber keys are allowed. This means that the FCM connection server can simultaneously store 4 different send messages for synchronization to the client application. If you exceed this number, there is no guarantee that keys with 4 keys will be closed by the FCM connection server.
The second approach is merging / grouping notifications / grouping. According to my answer here :
By grouping a notification, I assume that you mean stacking or linking notifications .
This is more about how you handle a notification in your client application. You just need to use setGroup () to add all your notifications to one group, and then call notify () to allow the NotificationManager to change.
This Add all notices to group documentation sums up pretty much all of this.
Update:
From one of the related messages , using the tag parameter is also an option:
The identifier used to replace existing notifications in the notification box.
If not specified, each request creates a new notification.
If indicated and a notification with the same tag is already displayed, the new notification replaces the existing one in the notification box.