检测在双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()。在Android文档。

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