0

I have used TelephonyManager.getDeviceId() for creating serial number for my android application. Now I have noticed it is changed when the user insert or removed SIM card!!!

Why this happens? My device is Samsung Galaxy SM-T211

How can I stop it?

It is an unbearable embarrassment for me to face my customers :((((

Bob
  • 22,810
  • 38
  • 143
  • 225
  • why you don't use mac Address of wifi or `Secure#ANDROID_ID` ? – Shayan Pourvatan Jul 06 '14 at 08:37
  • some devices does not have wifi so it is null. another amazing problem is when the wifi is off it returns null!!!!!!!! – Bob Jul 06 '14 at 08:39
  • see http://stackoverflow.com/questions/16078269/android-unique-serial-number/16929647#16929647 and http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id – Shayan Pourvatan Jul 06 '14 at 08:40
  • The value of `ANDROID_ID` changes if a factory reset is performed on the device – Bob Jul 06 '14 at 08:41
  • yes but my mean is `android.os.Build.SERIAL` – Shayan Pourvatan Jul 06 '14 at 08:44
  • documents: A hardware serial number, if available. When is not it available? – Bob Jul 06 '14 at 08:53
  • see this link that I post earlier ( http://stackoverflow.com/questions/16078269/android-unique-serial-number ) this tell completely, if you say IMEI have been changed you can use emmby's answer on http://stackoverflow.com/questions/2322234/how-to-find-serial-number-of-android-device – Shayan Pourvatan Jul 06 '14 at 08:59

0 Answers0