is Connect China Unicom - Android Hardware

Android examples for Hardware:Sim Card

Description

is Connect China Unicom

Demo Code


//package com.java2s;

import android.content.Context;

import android.telephony.TelephonyManager;

public class Main {
    public static boolean isConnectChinaUnicom(Context context) {
        TelephonyManager telManager = (TelephonyManager) context
                .getSystemService(Context.TELEPHONY_SERVICE);
        String operator = telManager.getSimOperator();
        if (operator != null) {
            if (operator.startsWith("46001")) {
                return true;
            } else {
                return false;
            }/*www.ja  v a2 s. c om*/
        } else {
            return false;
        }
    }
}

Related Tutorials