Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
- final String tmDevice, tmSerial, androidId;
- tmDevice = "" + tm.getDeviceId();
- tmSerial = "" + tm.getSimSerialNumber();
- androidId = "" + android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
- UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
- String deviceId = deviceUuid.toString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement