I have htc one b model android phone. I want to know my device ID. I do not know how could I finding out my device ID .
解决方案
Try this :
String deviceId = Secure.getString(this.getContentResolver(),
Secure.ANDROID_ID);
Toast.makeText(this, deviceId, Toast.LENGTH_SHORT).show();
android.provider.Settings.Secure.ANDROID_ID
A 64-bit number (as a hex string) that is randomly generated on the device’s first boot and should remain constant for the lifetime of the device.
Note : The value may change if a factory reset is performed on the device.
Hope this helps.