Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to get the unique Android device ID?

NickFNickF USAMember Posts: 132

Can someone please explain me how to retrieve the device ID which is unique? Is there a built in function for this in Android?

Tagged:

Comments

  • DavidMDavidM USAMember Posts: 342
    edited February 2014

    You can use Settings.Secure#ANDROID_ID to retrieve 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); 
    
Sign In or Register to comment.