检测在双SIM卡Android手机的两个SIM卡的状态 [英] Detect the status of two SIM cards in a dual-SIM Android phone

查看:992
本文介绍了检测在双SIM卡Android手机的两个SIM卡的状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检测两个SIM卡是否存在在我的双SIM卡的android手机编程。我发现一个API( TelephonyManager.getSIMState()),但它是正常的单卡手机。是否有任何的API,以检测是否不是两个SIM卡插在我的双SIM卡手机?

I want to detect whether two SIM cards are there in my dual-SIM android phone programmatically. I found one API (TelephonyManager.getSIMState()), but it is for normal single-SIM phones. Are there any APIs to detect whether or not two SIMs are inserted in my dual-SIM phone?

推荐答案

Android不支持多SIM卡,从SDK最少。谁创造多SIM设备设备制造商对自己这样做。欢迎您咨询您的设备制造商,看看他们是否有一个SDK插件或东西,可以让你进入第二个SIM卡。

Android does not support multiple SIMs, at least from the SDK. Device manufacturers who have created multi-SIM devices are doing so on their own. You are welcome to contact your device manufacturer and see if they have an SDK add-on or something that allows you to access the second SIM.

编辑: (2015年7月15日)

自22 API,您可以检查使用多个SIM卡 SubscriptionManager 的方法 getActiveSubscriptionInfoList()。在<一个更多细节href="https://developer.android.com/reference/android/telephony/SubscriptionManager.html#getActiveSubscriptionInfoList%28%29">Android文档。

Since API 22, you can check for multiple SIMs using SubscriptionManager's method getActiveSubscriptionInfoList(). More details on Android Docs.

这篇关于检测在双SIM卡Android手机的两个SIM卡的状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆