Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect the status of two SIM cards in a dual-SIM Android phone

Tags:

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?

like image 462
candy Avatar asked Nov 03 '11 14:11

candy


People also ask

How do I know if my Dual SIM is working?

To see if the phone your using is dual-SIM, go into your phone's Settings app. Tap on Network and internet. The SIM cards option should be right below Airplane mode. If you see that the option shows you two slots for a SIM card, your phone is Dual-SIM.

Are both SIMs active in Dual SIM phone?

They are both active only if you are not using them. If the SIM cards are both in Standby mode, you can make and receive calls on any of them. However, once you take a call on one SIM card, the other becomes inactive until the first card is no longer being used.

How do I access my second SIM?

At the top of the SIM card manager screen, you can see the two SIM cards inside your smartphone and their status. Tap on either of them.


2 Answers

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.

Edit: (15th July, 2015)

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

like image 195
CommonsWare Avatar answered Oct 19 '22 03:10

CommonsWare


From now, if the phone is MTK powered one, you can use TelephonyManagerEx class from MediaTek SDK.

Take a look at the docs.

like image 20
Andrey Kopeyko Avatar answered Oct 19 '22 03:10

Andrey Kopeyko