如何找到的Android设备的序列号? [英] How to find serial number of Android device?
问题描述
我需要使用一个唯一的ID为Android应用程序,我想的序列号的设备将是一个不错的人选。我该如何找回我的应用程序的Android设备的序列号?
TelephonyManager tManager =(TelephonyManager)myActivity.getSystemService(Context.TELEPHONY_SERVICE);
字符串的uid = tManager.getDeviceId();
getSystemService是从活动类中的方法。 getDeviceID()将返回该装置的MDN或MEID取决于哪个无线电电话使用(GSM或CDMA)。
每个设备必须回到这里独特的价值(假设它是一个电话)。这应该可以在任何Android设备的工作与SIM卡插槽和CDMA无线。你对你自己与搭载Android微波; - )
I need to use a unique ID for an Android app and I thought the serial number for the device would be a good candidate. How do I retrieve the serial number of an Android device in my app ?
TelephonyManager tManager = (TelephonyManager)myActivity.getSystemService(Context.TELEPHONY_SERVICE);
String uid = tManager.getDeviceId();
getSystemService is a method from the Activity class. getDeviceID() will return the MDN or MEID of the device depending on which radio the phone uses (GSM or CDMA).
Each device MUST return a unique value here (assuming it's a phone). This should work for any Android device with a sim slot or CDMA radio. You're on your own with that Android powered microwave ;-)
这篇关于如何找到的Android设备的序列号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!