gpt4 book ai didi

android - Shield 平板电脑中的 IMEI 在 Android Studio 上不可用

转载 作者:行者123 更新时间:2023-11-30 00:41:03 24 4
gpt4 key购买 nike

我想通过 getDeviceId() 函数获取 Shield 平板电脑中的 IMEI(国际移动设备识别码)。该程序适用于其他智能手机和平板电脑,但我在 Shield 平板电脑(nVIDIA Shield 8 英寸平板电脑)中遇到问题。Manifest 中的权限和 Android>=6 是有序的,您可以在下面找到这部分程序:

TelephonyManager tManager = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
IMEI = tManager.getDeviceId();

结果为空,请帮帮我。

最佳答案

引用 the documentation , getDeviceId():

Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones. Return null if device ID is not available.

(强调)

这不是这台设备独有的。我希望大多数缺少 GSM 或 CDMA 芯片的设备为 getDeviceId() 返回 null

您不妨回顾一下the documentation regarding unique identifiers .

关于android - Shield 平板电脑中的 IMEI 在 Android Studio 上不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42582888/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com