<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
取得TelephonyManager實體:
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
IMEI碼取得:
String deviceId = tm.getDeviceId();
相關方法參考:http://developer.android.com/reference/android/telephony/TelephonyManager.html
沒有留言:
張貼留言