有没有Android的GCM相当于一个到了iOS推送通知反馈服务? [英] Is there an Android GCM equivalent to the iOS Push Notification Feedback Service?

查看:335
本文介绍了有没有Android的GCM相当于一个到了iOS推送通知反馈服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的web应用程序发送推送通知请求到iOS和Android设备。

有关的iOS,苹果推送通知服务有一个反馈服务,使您可以检测到哪些设备已经卸载你的应用程序,然后从数据库中删除它。

有没有为Android GCM了类似的反馈服务?如果不是,如何检测其Android用户不必再安装应用程序?

解决方案
  

有没有为Android GCM了类似的反馈服务?

没有。

  

如果没有,如何检测其Android用户不必再安装应用程序?

引述文档

  
      
  1. 在最终用户卸载应用程序。
  2.   
  3. 的第三方服务器发送消息给GCM服务器。
  4.   
  5. 的GCM服务器发送消息给设备。
  6.   
  7. 的GCM客户端接收关于是否有广播接收器配置为接收它,它会返回错误信息和查询包管理器。
  8.   
  9. 的GCM客户端通知应用程序卸载的GCM服务器。
  10.   
  11. 的GCM服务器删除标记注册ID。
  12.   
  13. 的第三方服务器发送消息给GCM。
  14.   
  15. 的GCM返回NotRegistered错误信息给第三方服务器。
  16.   
  17. 的第三方删除注册ID。
  18.   
     

请注意,这可能需要一段时间的注册ID从GCM彻底清除。因此,有可能,在步骤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:

  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的GCM相当于一个到了iOS推送通知反馈服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆