当前位置: 代码迷 >> 综合 >> Android中获取IMEI码
  详细解决方案

Android中获取IMEI码

热度:36   发布时间:2024-01-19 17:52:11.0

//get IMEI码  
String IMEI = this.getSystemService(Context.TELEPHONY_SERVICE).getDeviceId();   

String myIMSI =android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMSI);


//打印  
System.out.println("IMEI:" + IMEI);  

修改Manifest.xml中权限:
<uses-permission android:name="android.permission.READ_PHONE_STATE" />  
  相关解决方案