androidandroid-identifiers

In android version 4.0 or higher, is ANDROID_ID completely unique?


In android version 4.0 or higher, is the bellow androidId completely unique?

androidId = android.provider.Settings.Secure.getString(getContentResolver(),android.provider.Settings.Secure.ANDROID_ID);

Solution

  • You didn't specify in what context you want the ID to be unique (is it app installations, devices, users, or something else?), so I am assuming you are just looking for a way to uniquely identify devices.

    ANDROID_ID should be reliable on all devices running 2.2 (Froyo) and later. However, as this Android developers blog post explains, there has been at least one instance in which a manufacturer broke ANDROID_ID.

    That blog post also explores a few other options for identifying devices (and why they aren't good options), and discusses why you probably don't actually need to identify unique devices. Generally identifying app installations is sufficient.