|
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 we need change this on the UPS server as well: https://developers.google.com/cloud-messaging/registration
If a bug in the client app triggers multiple registrations for the same device, it can be hard to reconcile state and the client app might end up with duplicate messages. Implementing canonical IDs can help you more easily recover from these situations. A canonical registration ID is the registration token of the last registration requested by the client app . This is the ID that the server should use when sending messages to the device.
If you try to send a message using an old registration token, GCM will process the request as usual, but it will include the canonical ID in the registration_id field of the response. We need to make sure to replace the registration token stored in UPS with this canonical ID, as eventually the old registration token will stop working.
|