Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android GCM "error":"NotRegistered"

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

like image 711
BiLL Avatar asked May 05 '14 10:05

BiLL


1 Answers

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.

like image 122
Ali Avatar answered Nov 18 '22 04:11

Ali