FCM-收到新的推送通知时,删除旧的推送通知磁贴 [英] FCM - Remove Older Push Notifcation Tiles when a new Push Notiifcation is recieved

查看:94
本文介绍了FCM-收到新的推送通知时,删除旧的推送通知磁贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经以Xamarin形式实施了FCM,并且按预期工作.但是我想在收到新的推送时从通知托盘中删除所有通知.

I have implemented FCM in Xamarin Forms and is working as expected. But I want to removed all the notifications from the notification tray when a new push is received.

我尝试使用相同的crash_key,但是收到了所有消息,而不是最近的推送.

I have tried using the same collapse_key, but all the messages are received instead of the recent push.

有人可以帮我吗?

推荐答案

您应继续使用tag参数,并记住该参数应位于notification有效负载中,而不应位于data中(自定义键值对)有效负载.

You should proceed with using the tag parameter, keeping in mind that it should be in the notification payload, not in the data (custom key-value pair) payload.

如果您使用Firebase Notification Console发送消息,则将无法在其中设置tag参数.尝试使用curl或Postman发送邮件.

If you are using the Firebase Notification Console to send the message, then you won't be able to set the tag parameter there. Try using curl or Postman to send the message.

这篇关于FCM-收到新的推送通知时,删除旧的推送通知磁贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆