也就这么简单的两行代码,比较的简单,Android手机的话,大家也可以用手机拨号*#06#一样可以查看(部分手机可能不可用)
TelephonyManager manager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String DeceiveId = manager.getDeviceId();
将设备号转换成UUID输出:<pre name="code" class="java"> UUID deceiveUid = new UUID(DeceiveId.hashCode(), 32);
还有就是权限的添加:
<pre name="code" class="plain"><uses-permission android:name="android.permission.READ_PHONE_STATE"/>