Code example for TelephonyManager

Methods: getSimOperatorNamegetSimState

0
  { 
    if (context == null)
      return ""; 
    TelephonyManager manager = (TelephonyManager)context.getSystemService("phone");
 
    if ((manager != null) && (manager.getSimState() == 5))
    { 
      return manager.getSimOperatorName();
    } 
    return ""; 
  } 
 
  static String getNetworkOperator(Context context)
  { 
    if (context == null) {
      return ""; 
    } 
    TelephonyManager manager = (TelephonyManager)context.getSystemService("phone");
 
    if ((manager != null) && (manager.getPhoneType() == 1)) {
Connect your IDE to all the code out there  Get Codota for Java