android - 我在 Android 10 中收到 IMEI 号码错误
问题描述
我在 Android 10 中收到 IMEI 和 SIM 序列号错误,例外情况是 -
java.lang.SecurityException: getDeviceId: The user 10526 does not meet the requirements to access device identifiers.
java.lang.SecurityException: getIccSerialNumber: The user 10526 does not meet the requirements to access device identifiers.
解决方案
我在 Android 10 中收到 IMEI 和 SIM 序列号错误
从 Android 10 开始,Google 增加了访问设备不可重置标识符的限制。
对于所有第三方应用程序(从 Google Play 商店安装),所有方法getImei()、getDeviceId()、getSerial()都将返回SecurityException或null 。
无法在 Android 10 或更高版本的设备上获取 IMEI。
推荐阅读
- mysql - 使用其他组件对空变量进行 SQL 数据库计算
- c++ - 如何使用 libconfini 静态回调为类变量赋值
- sdk - Yocto SDK ROS1 旋律元 ros 构建
- flutter - URL 的目标不存在:'import 'package:velocity_x/velocity_x.dart';
- mysql - 如何用 MySQL 替换 » “直角引号”
- python - 无法捕获 Git 命令完整输出流
- typescript - 打字稿:理解`
` - pandas - 对于pandas数据集中的模型,添加新特征时可以使用目标列吗?
- json - 通过spark读取漂亮的json格式数据
- apache -
子句因 RewriteRule 失败