Android GCM "error": "NotRegistered"

I use the Android GCM Push service, it works fine for some time, but if I leave my Idle application for a few minutes or when I restart it after some code changes, I will not receive any messages and the GCM server give me this error : "NotRegistered", I did some kind of investigation, I found this posted question , but I still can not comment on it (low reputation :( and the message is so old)

After going through it, I decided that sometimes the Google server can automatically update the registration identifier. Therefore, I need to know exactly when the GCM server dispenses these changes on the registry ID and how to update my saved regID in my database

I am a newbie, so I hope that my question is clear. Thank you for helping me.

+6
source share
1 answer

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

  • Application update
  • Reinstall
  • Delete application data

Then you have to process onTokenRefresh yourself to save the token and update it in your server database.

+1
source

All Articles