• 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.TELEPHONY_SERVICE);
final String tmDevice, tmSerial, tmPhone, 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();
 
Welcome to the Android Forums!

Moving your thread to the Android Developers forum as you'll have a better change of getting an answer here. Be patient... many of these smart folks work other jobs during the day and it may take a while for someone to see your post and respond accordingly.
 
Back
Top Bottom