标签:
TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imsi = mTelephonyMgr.getSubscriberId();
String imei = mTelephonyMgr.getDeviceId();
Log.i("IMSI", imsi);
Log.i("IMEI", imei);
==============================================================================
另外不要忘了在AndroidManifest.xml中加上读取手机状态的权限
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
标签:
原文地址:http://www.cnblogs.com/wangluochong/p/4581575.html