Is there a way to keep a consistent GCM iD even after we re-install our app. as of now its changing if i uninstall the app.
Asked
Active
Viewed 70 times
1 Answers
1
No you can not.
If you are facing problem with identifying the correct device on server, then use device_id as primary id to identify device. Read Is there a unique Android device ID?, how to get device id and store it on server. Now if your registartion id has changed at any time, you have device_id and you can identify your device, and then you should update new registartion id of device.

Community
- 1
- 1

Pankaj Kumar
- 81,967
- 29
- 167
- 186
-
Thanks ! device_id seems to be good, however i guess wifi mac id is more reliable than device_id. – LEE Mar 27 '15 at 05:52
-
If min sdk version of your app is 2.2 or below, then yes you can go with that. http://developer.samsung.com/technical-doc/view.do?v=T000000103 is a complete solution for each option which can give you unique identifier for device. They also listed disadvatages for each, so it will help you to choose your target. – Pankaj Kumar Mar 27 '15 at 07:48
-
I'm using 4.0 and above. So what do you suggest? – LEE Mar 27 '15 at 08:17
-
Then device id is better option. – Pankaj Kumar Mar 27 '15 at 08:19