TelephonyManager.getPhoneType 的值是和手机相关的,是固定的还是和sim 卡相关?无论 sim 是什么类型,返回值都是固定常数? 谢谢
最佳答案
术语“PhoneType”在这里肯定令人困惑 - 它似乎实际上是指手机当前使用的设备类型。因此,同一部物理电话可能会针对不同的订阅报告不同的值:
TelephonyManager.getPhoneType
通话
getCurrentPhoneType(getDefaultSubscription())
“getCurrentPhoneType”的注释表明它返回特定订阅的设备类型:
/**
* Returns a constant indicating the device phone type for a subscription.
*
* @see #PHONE_TYPE_NONE
* @see #PHONE_TYPE_GSM
* @see #PHONE_TYPE_CDMA
*
* @param subId for which phone type is returned
*/
关于android - TelephonyManager.getPhoneType 的值是跟phone 和一个固定的常量有关还是跟sim 卡有关?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35743664/