is Connect China Telecom - Android Hardware

Android examples for Hardware:Sim Card

Description

is Connect China Telecom

Demo Code


//package com.java2s;

import android.content.Context;

import android.telephony.TelephonyManager;

public class Main {
    public static boolean isConnectChinaTelecom(Context context) {
        TelephonyManager telManager = (TelephonyManager) context
                .getSystemService(Context.TELEPHONY_SERVICE);
        String operator = telManager.getSimOperator();
        if (operator != null) {
            if (operator.startsWith("46003")) {
                return true;
            } else {
                return false;
            }//  www  .j a  v  a2s . c  om
        } else {
            return false;
        }
    }
}

Related Tutorials