• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps help me to display string ?

I'm a newbie in android, i want to find serial number of a android device ... Somebody can help me to display string "deviceId" ? Thank for your help :)
---------------------------
final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHON Y_SERVICE);
final String tmDevice, tmSerial, tmPhone, androidId;
tmDevice = "" + tm.getDeviceId();
tmSerial = "" + tm.getSimSerialNumber();
androidId = "" + android.provider.Settings.Secure.getString(getCont entResolver(), android.provider.Settings.Secure.ANDROID_ID);

UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
String deviceId = deviceUuid.toString();
 
Back
Top Bottom