如何在从属槽中获取SIM卡的运营商名称



对于双卡设备如何获取从插槽中的networkoperatorname。我的主SIM卡被停用了

我没有在android API上找到任何东西来获得所有SIM运营商的详细信息。只有我们可以得到当前网络运营商或SIM运营商的名称

TelephonyManager telephonyManager =((TelephonyManager) Context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();

SIM操作符可以使用以下命令检索:

String operatorName = telephonyManager.getSimOperatorName();

您需要使用SubscriptionManagergetActiveSubscriptionInfoList() https://developer.android.com/reference/android/telephony/SubscriptionManager.html#getActiveSubscriptionInfoList()

但是,请记住它只在API Level 22中添加

最新更新