I\'m sending push notifications from FCM to an Android device, this is done by sending a POST message to FCM containing a JSON body.
If I send the same JSON body twi
Well, I kept digging and found the answer: it was not the "collapse_key", i was supposed to use the "tag" option in the notification instead.
So by using this JSON only one notification is shown:
{
"notification": {
"title": "MyAPP",
"body": "Open MyAPP to access your data",
"click_action" : "OPEN_MAINACTIVITY",
"icon": "ic_launcher_red",
"color": "#ff0000"
"tag": "unique_tag"
},
"data": {
"extra1":"sample1",
"extra2":"sample2"
},
"registration_ids":[
"--my_id--"
]
}
Hope this helps others!
And if someone wishes to explain further on "collapse_key" I would be glad, clearly I misunderstood it.