0
votes

While publishing the Android app, I created a blunder. I commented the code which used to fetch GCM registration ID and send it to our server for persistence. We do have the device ID of all the users, however, their GCM Registration ID is missing on our server side. Is there any way, by which I can register all my users and get their GCM registration ID from the server directly using their respective device ID?

Also, if anyone gives me the correct solution, a Beer treat is assured!

1

1 Answers

1
votes

In short No. The GCM InstanceID token identifies an app on a device, so more than the device's ID would be needed to generate the token. Google Play Services on your client device is used to generate the application's InstanceID token. This token cannot be generated from the device ID.

Each app on a device should have a unique InstanceID token, being able to generate this externally from the device with known parameters could be a security issue.