TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String imei = tm.getDeviceId();
String tel = tm.getLine1Number();
加上权限
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
String imei = tm.getDeviceId();
String tel = tm.getLine1Number();
加上权限
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>