3

Settings.Secure#ANDROID_ID is supposed to be used as a unique device identifier, with the advantage that if the device is wiped it is reset; this means if a user sells their device, anything device specific pertaining to that user is not associated with it, which is clearly advantageous.

However, my phone has the Kindle app and when I upgraded from Eclair to Froyo, and again to Gingerbread, the Amazon site registered each new build as a separate device. This suggests that upgrading a device (as opposed to wiping it) changes the ID.

  1. Does it?
  2. What is the most reliable means of an installed application recalling the previous device ID across a system upgrade? (If an application knows its old device ID, it can link the new one to the old one on a remote system, for example.)
gog
  • 1,220
  • 11
  • 30
Andrew Wyld
  • 7,133
  • 7
  • 54
  • 96
  • By the way, I'm aware that there may be no 100% reliable means of recalling something across a system upgrade; I want opinions on the means with the lowest probability of failure. – Andrew Wyld Apr 02 '12 at 15:18

1 Answers1

0

This is device dependent. So if you have a strong requierment on it being uniqe you need to find something else. For identification of a user i would suggest login with username and password and a MD5 hash of this stored serverside. Settings.Secure#ANDROID_ID will work on most devices, but as you already stated, not on al, som will retan it after a upgrade or reset, some wont. Some devices have the same id, that is al devices of a specific manufacturer will have the same ID. Read more here Is there a unique Android device ID?

Community
  • 1
  • 1
Carl-Emil Kjellstrand
  • 1,233
  • 1
  • 10
  • 17