本文介绍了我在Android Q中收到IMEI空值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从telephonymanager获取IMEI ID为空.该怎么办?

I am getting the IMEI ID null from the telephonymanager. What to do?

有什么解决方法吗?

推荐答案

Android Q已限制访问IMEI和序列号.它仅适用于具有特殊运营商许可的平台和应用.此外,权限READ_PRIVILEGED_PHONE_STATE不适用于非平台应用程序.

Android Q has restricted to access for both IMEI and serial no. It is available only for platform and apps with special carrier permission. Also the permission READ_PRIVILEGED_PHONE_STATE is not available for non platform apps.

如果您尝试访问它,则会抛出以下异常

If you try to access it throws below exception

java.lang.SecurityException: getImeiForSlot: The user 10180 does not meet the requirements to access device identifiers.

请参考文档: https://developer.android.com/preview/privacy/data-identifiers #device-ids

也请参阅问题

这篇关于我在Android Q中收到IMEI空值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 05:32