android - 是否有与 iOS 推送通知反馈服务等效的 Android GCM?

标签 android service apple-push-notifications google-cloud-messaging feedback

我们的网络应用向 iOS 和 Android 设备发送推送通知请求。

对于 iOS,Apple 推送通知服务提供反馈服务,因此您可以检测哪些设备卸载了您的应用,然后将其从数据库中删除。

Android GCM有类似的反馈服务吗?如果没有,如何检测哪些 Android 用户不再安装该应用程序?

最佳答案

Is there a similar feedback service for Android GCM?

没有。

If not, how to detect which Android users no longer have the app installed?

引用 the documentation :

  1. The end user uninstalls the application.
  2. The 3rd-party server sends a message to GCM server.
  3. The GCM server sends the message to the device.
  4. The GCM client receives the message and queries Package Manager about whether there are broadcast receivers configured to receive it, which returns false.
  5. The GCM client informs the GCM server that the application was uninstalled.
  6. The GCM server marks the registration ID for deletion.
  7. The 3rd-party server sends a message to GCM.
  8. The GCM returns a NotRegistered error message to the 3rd-party server.
  9. 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).

关于android - 是否有与 iOS 推送通知反馈服务等效的 Android GCM?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16595511/

相关文章:

android - 按钮监听器未在第一次单击时注册在 android 中

android - 圆形图标在 Android Studio 3.0 中没有改变

android - 将 Google Direction API 与多个航路点和模式结合使用

java - 使用 Retrofit 解析 Android 的 JSON

java - Centos java定制服务

android - Android中哪种类型的服务会占用更多的系统资源

linux - 仅根据某些信号崩溃时如何使用 systemd 重启服务

ios - 退出飞行模式后未收到 PushKit 通知

php - stream_socket_client 在我的服务器上失败,无法了解有关错误的更多信息

ios - 当 iOS 应用程序在前台时忽略推送通知