怎么检查云消息Android Studio Firebase中消息的传递状态以及是否已读?

huangapple go评论67阅读模式
英文:

How to check the delivery status of a message and whether it is read or not in cloud messaging android studio Firebase?

问题

如何检查在云消息 Android Studio Firebase 中消息的传递状态以及是否已读?
我发送消息,它们到达,但我不知道如何检查消息是否已读。

英文:

How to check the delivery status of a message and whether it is read or not in cloud messaging android studio Firebase?
I send messages, they come, but I do not know how to check whether the message has been read or not.

答案1

得分: 0

Firebase Cloud Messaging没有提供API来跟踪单个消息的交付状态。如果您需要知道用户是否已接收(或查看)消息,您应该在您自己的应用程序逻辑中实现此功能。

一个示例是只发送数据消息(不会被系统自动显示),自行处理这些消息的通知显示,跟踪用户是否与通知互动,然后将该信息存储在云托管的数据库中。

英文:

There is no API to track delivery status for individual messages in Firebase Cloud Messaging. If you need to know whether a user has received (or seen) a message, you should implement that in your own application logic.

One example of this is to only send data messages (that are not automatically displayed by the system), handle the display of a notification for those messages yourself, track whether the user interacted with the notification, and then store that information in a cloud-hosted database.

huangapple
  • 本文由 发表于 2023年2月19日 20:24:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/75500119.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定