Reputation: 250
For dual SIM device how to getNetworkOperatorName which is in slave slot. And my master SIM is deactivated.
Upvotes: 1
Views: 6822
Reputation: 6725
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
Upvotes: 0
Reputation: 53657
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();
Upvotes: 4