Android Unique Device ID
Secure Android Unique Device ID
On a device first boot, a randomly value is generated and stored. The Android_ID is a unique 64 bit number that is generated and stored when the device is first booted. The Android_ID is wiped out when the device is Factory reset and new one gets generated. It’s a 64-bit number that should remain constant for the lifetime of a device
String unique_deviceid = Settings.Secure.getString(getApplicationContext()
.getContentResolver(),Settings.Secure.ANDROID_ID);
TextView textView = (TextView)findViewById(R.id.textView_deviceID);
textView.setText(unique_id);
Screeenshot :-