11

i want to know does the android device id change when the android version is update to latest. If it changes, how can i get notified about the version change.

rajeev kumar
  • 239
  • 1
  • 4
  • 11

3 Answers3

17

This may no longer be a correct answer. The following from https://android-developers.googleblog.com/2017/04/changes-to-device-identifiers-in.html

Android ID

In O, Android ID (Settings.Secure.ANDROID_ID or SSAID) has a different value for each app and each user on the device. Developers requiring a device-scoped identifier, should instead use a resettable identifier, such as Advertising ID, giving users more control. Advertising ID also provides a user-facing setting to limit ad tracking.

Additionally in Android O:

The ANDROID_ID value won't change on package uninstall/reinstall, as long as the package name and signing key are the same. Apps can rely on this value to maintain state across reinstalls.

If an app was installed on a device running an earlier version of Android, the Android ID remains the same when the device is updated to Android O, unless the app is uninstalled and reinstalled.

The Android ID value only changes if the device is factory reset or if the signing key rotates between uninstall and reinstall events.

This change is only required for device manufacturers shipping with Google Play services and Advertising ID. Other device manufacturers may provide an alternative resettable ID or continue to provide ANDROID ID.

Montwell
  • 505
  • 3
  • 12
11

Device ID is a 64-bit number (as a hexadecimal string) that is randomly generated on the device’s first boot and should remain constant for the lifetime of the device, though the value may change if a factory reset is performed on the device.

The device ID does not change when the Android version is updated to the latest version. If you want to change your device ID then visit here.

Joseph Woodward
  • 9,191
  • 5
  • 44
  • 63
Android Boy
  • 4,335
  • 6
  • 30
  • 58
  • 2
    I know that in theory the Android ID should not change, but recently we have been experiencing some problems with one of our apps for mainly OnePlus 3 devices, but also some others (never Nexus devices) which seem to point into and Android ID change after an update from Android 6 to 7... Still trying to verify but we haven't been able to reproduce this yet. – Kasium Jan 31 '17 at 15:58
  • 1
    yes. I got same issue in my application. whenever application open, Device ID was changed. – shailesh Oct 18 '19 at 06:00
  • I've also formatted my laptop installed a fresh OS and then installed android studio. Then too It generated new Device ID. it doesn't has to be limited to just the phone factory reset. – Ashutosh Soni Feb 08 '21 at 14:36
  • I noticed same issue today in one of our apps, Did you find any solution to preserve this ? – Zahra Feb 07 '22 at 15:40
0

Yes it changes, I found that device ID changed in my case. In my app each device is connected with my database for certain special tasks, varies device by device and I uniquely identify each device by Settings.Secure.ANDROID_ID which gives me device unique ID.

But I found that that it changed on one of Samsung android device and disconnected from Database Server.

Own
  • 174
  • 1
  • 11