Android GCM“error”:“NotRegistered” [英] Android GCM "error":"NotRegistered"

查看:128
本文介绍了Android GCM“error”:“NotRegistered”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Android GCM Push服务,一段时间后效果很好,但如果我将应用程序闲置几分钟,或者在代码修改后重新运行,我不会收到消息,GCM服务器会给我此错误:NotRegistered我做了一些resurch,我发现这个发布的问题,但我不能那里评论(低声誉:(和帖子是如此之久)



当我经历它时,我感到不知所措,有时Google服务器可以自动刷新注册ID,所以我需要要知道是什么时候确切的GCM服务器剂量regestration id这些修改,以及如何更新我的数据库中保存的regID



我是新的所以希望我的问题是清除
感谢您帮助我

解决方案

如果您更改了部分代码,并在您的应用程序上重新安装设备上,最后一个令牌可能已更改可能在这些情况下更新令牌:
$ b


  • 重新安装

  • 清除应用程序数据



然后,您应该处理 onTokenRefresh 您的自我保存令牌并将其更新到服务器数据库中。


I am using Android GCM Push service, it works great for some time, but if I keep my application Idle for some minutes, or when i rerun it after some modifications in the code i get no messages and the GCM server give me this error :"NotRegistered" i did some resurch i found this posted question but i cant comment there yet (low reputation :( and the post is so old)

While going through it i undrestand that sometime Google server can refresh registration id automatically, So what i need to know is when exactly the GCM server dose these modifications on the regestration id and how to update my saved regID in my database

I'm new so hope that my question is clear Thank you for helping me out

解决方案

If you change some of your codes, and reinstall the app on your device, the last token may changed. Google may update the token on these cases:

  • App update
  • Re installation
  • Clearing the app data

Then you should handle the onTokenRefresh your self to save the token and update it in your server database.

这篇关于Android GCM“error”:“NotRegistered”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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