I have a problem with understanding Canonical Registration Id
and getting it returned by Google. I have deliberately registered my Android app twice (to test Canonical Registration Id
) but when I try to push a message to both Registration Ids
I don't get in the return from Google a Canonical Registration Id
.
In addition, I would like to know what the format of the message Id returned by Google means. I can see in the log that it seems to consist of three parts <something>:<something2>%<something3>
. Any idea what they mean? Does the 3rd part identify the device?
[INFO com.bipper.filters.PushUpdatesFilter] [ messageId=0:1349819220154718%921c249a6e2555b5 ] [INFO com.bipper.filters.PushUpdatesFilter] [ messageId=0:1349819220242456%921c249a6e2555b5 ]
I managed to get a canonical registration id from GCM this way :
The initial state : Application is installed on Android device and is registered to GCM. Sender server has the registration Id and manages to send messages to that device.
Uninstall the application.
Send two messages to the original (old) registration Id. The first will seem to work (server will receive a successful reply from GCM server). The second attempt will result in a "NotRegistered" error.
Re-install the application and register to GCM. The device will get a new registration Id.
Send a message using the old registration Id. The application will receive the message, but the server will get in the reply the new registration Id as canonical registration Id.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With