是否有等效于 iOS 推送通知反馈服务的 Android GCM? [英] Is there an Android GCM equivalent to the iOS Push Notification Feedback Service?
问题描述
我们的网络应用向 iOS 和 Android 设备发送推送通知请求.
对于 iOS,Apple 推送通知服务具有反馈服务,因此您可以检测哪些设备卸载了您的应用,然后将其从数据库中删除.
Android GCM 有类似的反馈服务吗?如果没有,如何检测哪些 Android 用户不再安装该应用?
Android GCM 是否有类似的反馈服务?
没有
<块引用>如果没有,如何检测哪些 Android 用户不再安装该应用?
引用文档:
<块引用>- 最终用户卸载应用程序.
- 第 3 方服务器向 GCM 服务器发送消息.
- GCM 服务器将消息发送到设备.
- GCM 客户端收到消息并询问包管理器是否有配置为接收它的广播接收器,返回 false.
- GCM 客户端通知 GCM 服务器应用程序已卸载.
- GCM 服务器标记要删除的注册 ID.
- 第 3 方服务器向 GCM 发送消息.
- GCM 向第 3 方服务器返回 NotRegistered 错误消息.
- 第 3 方删除注册 ID.
请注意,从 GCM 中完全删除注册 ID 可能需要一段时间.因此,在上述步骤 7 期间发送的消息可能会获得有效的消息 ID 作为响应,即使该消息不会传送到设备.最终,注册 ID 将被删除,服务器将收到 NotRegistered 错误,而无需第三方服务器执行任何进一步操作(这种情况在开发和测试应用程序时经常发生).
Our webapp sends push notification requests to iOS and Android devices.
For iOS, the Apple Push Notification Service has a feedback service so you can detect which devices have uninstalled your app and then remove it from your database.
Is there a similar feedback service for Android GCM? If not, how to detect which Android users no longer have the app installed?
Is there a similar feedback service for Android GCM?
No.
If not, how to detect which Android users no longer have the app installed?
Quoting the documentation:
- The end user uninstalls the application.
- The 3rd-party server sends a message to GCM server.
- The GCM server sends the message to the device.
- The GCM client receives the message and queries Package Manager about whether there are broadcast receivers configured to receive it, which returns false.
- The GCM client informs the GCM server that the application was uninstalled.
- The GCM server marks the registration ID for deletion.
- The 3rd-party server sends a message to GCM.
- The GCM returns a NotRegistered error message to the 3rd-party server.
- The 3rd-party deletes the registration ID.
Note that it might take a while for the registration ID be completely removed from GCM. Thus it is possible that messages sent during step 7 above gets a valid message ID as response, even though the message will not be delivered to the device. Eventually, the registration ID will be removed and the server will get a NotRegistered error, without any further action being required from the 3rd-party server (this scenario happens frequently while an application is being developed and tested).
这篇关于是否有等效于 iOS 推送通知反馈服务的 Android GCM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!