JAPS
JAPS

Reputation: 250

How to get Operator Name for SIM in slave slot?

For dual SIM device how to getNetworkOperatorName which is in slave slot. And my master SIM is deactivated.

Upvotes: 1

Views: 6822

Answers (2)

pandre
pandre

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

Sunil Kumar Sahoo
Sunil Kumar Sahoo

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

Related Questions