For dual SIM device how to getNetworkOperatorName which is in slave slot. And my master SIM is deactivated.
Sunil Kumar Sahoo
I didn't find anything on android API to get all SIM operators details. Only we can get the name of the Current Network Operator or SIM operator
TelephonyManager telephonyManager =((TelephonyManager) Context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
SIM operator can be retrieved by using:
String operatorName = telephonyManager.getSimOperatorName();
You need to use SubscriptionManager
's getActiveSubscriptionInfoList()
https://developer.android.com/reference/android/telephony/SubscriptionManager.html#getActiveSubscriptionInfoList()
However, keep in mind that it was only added in API Level 22
来源:https://stackoverflow.com/questions/8738798/how-to-get-operator-name-for-sim-in-slave-slot