Home > DeveloperSection > Forums > Does there exist any unique Android device ID?
Samuel Fernandes
Samuel Fernandes

Total Post:154

Points:1082
Posted on    April-23-2015 5:14 AM

 Android Android 
Ratings:


 1 Reply(s)
 461  View(s)
Rate this:
Do Android devices have a unique id, and if so, what is a simple way to access it via Java?


Mayank Tripathi
Mayank Tripathi

Total Post:397

Points:3117
Supported
Posted on    April-23-2015 8:03 AM

Settings.Secure#ANDROID_ID returns the Android ID as an unique 64-bit hex string.

import android.provider.Settings.Secure;
private String android_id = Secure.getString(getContext().getContentResolver(),
                                                        Secure.ANDROID_ID); 

Don't want to miss updates? Please click the below button!

Follow MindStick