Context context = getWindow().getContext();
TelephonyManager telephonemanage = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
try {
Toast.makeText(this, "MIEI码:"+telephonemanage.getDeviceId(), 1000).show();
}catch(Exception e){
Log.i("error", e.getMessage());
}
添加权限:<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
Android 获取手机IMEI (串号) 手机唯一标识
最新推荐文章于 2021-10-18 17:09:16 发布