Android获取SIM卡的运营商

在Android的主Activity的初始化函数中添加:

TelephonyManager tm = (TelephonyManager) this
        .getSystemService(TELEPHONY_SERVICE);
String SubscriberId = tm.getSubscriberId();

if (SubscriberId != null && SubscriberId != "null") {
  if (SubscriberId.startsWith("46001")) {
      // 联通
  } else if (SubscriberId.startsWith("46003")) {
      // 电信
  } else {
      // 移动
    }
}
原文地址:https://www.cnblogs.com/Colored-Mr/p/4317291.html