How to getSimOperator in dual SIM phone android?

Hitesh Matnani

New member
Dec 5, 2016
1
0
0
Visit site
I am building an android application where I need a value of "getSimOperator".

I am able to get this value > 21 API version but for the lower version in dual SIM. I am getting a value of SIM1 but not able to get SIM2 value.

How can I get "getSimOperator" value of SIM2 < 21 API version.

I earlier posted a question below is the link How to get Mcc and Mnc below LOLLIPOP_MR1 devices in android? - Stack Overflow.

Someone has referred me a link http://stackoverflow.com/questions/32707158/dual-sim-android-phone-which-sim-receive-a-call/32871156#32871156.

But I am getting an error while implementing the code of above link. I had listed down the error "java.lang.NoSuchMethodException: getDefault [int]"

Cloud anyone explains me why this error is coming.
 

B. Diddy

Senior Ambassador
Moderator
Mar 9, 2012
165,602
4,751
113
Visit site
Moved from the KitKat forum to the Software Development forum, for more appropriate traffic.