如何获取从 PHP 后端发送的 Firebase 通知状态(打开与否)?
How to get Firebase notification status (opened or not) which is sent from PHP backend?
当我从 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,指定通知已打开。
当我从 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,指定通知已打开。