Can FCM notification on Android overwrite previous one?

前端 未结 2 1030
名媛妹妹
名媛妹妹 2021-02-06 04:28

I\'m using FCM to send notifications to Android devices. When the app is in background, if I send 10 notifications, the devices will show up 10 entries on the notification bar.<

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 04:46

    To achieve this, in your notification payload, use the tag key

    {
        "notification" : {
            "title" : "Notification Title",
            "body" : "Notification Body",
            "tag" : "your_unique_tag"
        }
    }
    

    Cheers.

提交回复
热议问题