Firebase Cloud Messaging - 确定特定推送通知消息的传送状态
Firebase Cloud Messaging - Identify delivery status for a particular push notification message
是否可以识别特定的推送通知消息是否通过 Firebase 云消息传送到特定的令牌?而且,如果是这样,是否可以通过 API 调用或通过收听一些回调来实现?
我知道我可以在控制台中查看汇总统计数据,甚至可以通过分析标签对这些统计数据进行细分,但找不到获取更多离散信息的方法。
我也知道 API 会在令牌无效时同步响应,但 Apple 和 Google 使令牌无效的过程有点不透明(对我来说)并且没有帮助如果有人只是关闭了我的应用程序的推送通知。
谢谢!
杰森
如果有人关闭了推送通知 – 你可以用代码查看
Android app - detect if app push notification is off
但是用户可能处于离线状态,或者 APNs / Firebase 服务 – 可能会出现一些问题,您的通知将被删除。您可以在 iOS 和 Android 应用程序中使用一些代码检查交付状态。
如果您需要检查某些推送的发送状态,您可以制作推送通知扩展(在iOS 中)。在您的 API 中获取有关已发送通知的发送状态。有关推送通知扩展的更多信息。
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
可能会有帮助
https://developer.apple.com/documentation/usernotifications
https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
https://firebase.google.com/docs/cloud-messaging/understand-delivery
https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages 关于处理 Android 中的消息(您也可以发送已发送状态)
希望这个回答对您的问题有所帮助。
UPD:
https://firebase.google.com/docs/cloud-messaging/understand-delivery
Received (available only on Android devices) — The data message or
notification message has been received by the app. This data is
available when the receiving Android device has FCM SDK 18.0.1 or
higher installed.
是否可以识别特定的推送通知消息是否通过 Firebase 云消息传送到特定的令牌?而且,如果是这样,是否可以通过 API 调用或通过收听一些回调来实现?
我知道我可以在控制台中查看汇总统计数据,甚至可以通过分析标签对这些统计数据进行细分,但找不到获取更多离散信息的方法。
我也知道 API 会在令牌无效时同步响应,但 Apple 和 Google 使令牌无效的过程有点不透明(对我来说)并且没有帮助如果有人只是关闭了我的应用程序的推送通知。
谢谢! 杰森
如果有人关闭了推送通知 – 你可以用代码查看
Android app - detect if app push notification is off
但是用户可能处于离线状态,或者 APNs / Firebase 服务 – 可能会出现一些问题,您的通知将被删除。您可以在 iOS 和 Android 应用程序中使用一些代码检查交付状态。
如果您需要检查某些推送的发送状态,您可以制作推送通知扩展(在iOS 中)。在您的 API 中获取有关已发送通知的发送状态。有关推送通知扩展的更多信息。
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
可能会有帮助
https://developer.apple.com/documentation/usernotifications
https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
https://firebase.google.com/docs/cloud-messaging/understand-delivery https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages 关于处理 Android 中的消息(您也可以发送已发送状态)
希望这个回答对您的问题有所帮助。
UPD:
https://firebase.google.com/docs/cloud-messaging/understand-delivery
Received (available only on Android devices) — The data message or notification message has been received by the app. This data is available when the receiving Android device has FCM SDK 18.0.1 or higher installed.