Android Question Gcm cloud messaging id expiration and push on two devices.

Sub7

Active Member
Licensed User
Longtime User
Hello,
does the generated ID used with gcm cloud messaging service expire?
i am testing an app that include notifications activated by a webservice, the notifications show up but is happen that i tried to send a notification to a device after some hours (2) from install (the push service starts at boot) and i got this error message from google: RegistrationError and no push.
So i re-registred the device and everything went working again.

Should i unregister and re-register frequently?

From what i've read there was a expiration time of 7 days but now things has changed.

From stackoverflow:

When you send a notification to a registration id which is expired, for the 1st time the message(notification) will be delivered but you will get a new registration id with the name canonical id. Which mean, the registration id you sent the message to has been changed to this canonical id, so change it on your server side as well.

Could be that the problem? should i care of the canonical ID thing?
and if the ID does not expire, why unregister?


I noticed that while running the same app in two different devices only one receive the push notification,
for example i may want to run the app with my account on different devices, which is the correct way to manage two or more devices sharing the same account?


Maybe this is the problem of GCM error: RegisterError?


I apologize for so many questions but it's the first time i use gcm :D

L.
 

Sub7

Active Member
Licensed User
Longtime User
From what i've understand every time the app is updated a new registration hash have to be generated and register again with Google.

I was not re-registering again after update and this caused such error.
 
Upvote 0
Top