gpt4 book ai didi

android - 如何获取从 PHP 后端发送的 Firebase 通知状态(打开与否)?

转载 作者:行者123 更新时间:2023-11-29 19:29:06 25 4
gpt4 key购买 nike

当我从 Firebase 控制台发送任何通知时,我可以从 Firebase 控制台监控我的通知状态(有多少设备收到或有多少打开它)。

现在我开发了一个 PHP 后端并使用 curl 我可以向我的用户发送通知。我需要针对每个通知监控有多少设备收到了我的通知以及有多少设备打开了通知?

这可能吗?请让我知道最佳实践。谢谢。

最佳答案

对于有多少设备收到我的通知部分,我认为你应该使用Delivery Receipts :

Delivery Receipt: If the app server included delivery_receipt_requested in the downstream message, the XMPP connection server sends a delivery receipt when it receives confirmation that the device received the message.

对于有多少设备打开它部分,我认为这应该是您的客户端应用程序上的自定义实现。例如,如果用户确实点击了您的通知并打开了您应用的特定 Activity ,那么您应该 Send an Upstream message , 指定通知已打开。

关于android - 如何获取从 PHP 后端发送的 Firebase 通知状态(打开与否)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40544958/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com