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

candy picture candy · Nov 3, 2011 · Viewed 39.8k times · Source

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?

Answer

CommonsWare picture CommonsWare · Nov 3, 2011

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.