- import android.provider.Settings.Secure;
- private String android_id = Secure.getString(getContext().getContentResolver(),
- Secure.ANDROID_ID);
- UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
- String deviceId = deviceUuid.toString();
- //该片段来自于http://www.codesnippet.cn/detail/0312201411156.html
来源: http://www.codesnippet.cn/detail/0312201411156.html