Google Android GCM NotRegistered error

2019-02-17 22:24发布

问题:

I am using Android GCM Push service, it works great for some time but inbetween it fails.

Here are the details, If I keep my application Idle for some time then suddenly server is getting response as NotRegistered from Google GCM, strange.

While going through the document it says that sometime Google server can refresh registration id automatically, so this means I need to update my servers whenever Google tells me. Ok I can do that.

Now secondly is there any other chance where I can get NotRegistered error from Google GCM server?

Also in documentation there is setRegisteredOnServer method? So do I also need to call this method with flag as true?

Really dont know what is the exact issue here? Did anybody faced the same problem before?

Anybody will help me out here?

回答1:

Solved.Actually the Reg Id is getting changed automatically and we were not updating it on server on the change.