iPhone判断运营商

- (NSString *)getCarrier
{
    NSString *strCarrier = nil;
    CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
    CTCarrier *carrier = [networkInfo subscriberCellularProvider];
    if (carrier == nil)
    {
        [networkInfo release];
        return strCarrier;
    }  

    NSString *code = [carrier mobileNetworkCode];
    if (code == nil)
    {
        [networkInfo release];
        return strCarrier;
    }  

    // 根据mobileNetworkCode判断运营商
    if ([code isEqualToString:@"00"] || [code isEqualToString:@"02"] || [code isEqualToString:@"07"])
        strCarrier = @"中国移动";
    else if ([code isEqualToString:@"01"] || [code isEqualToString:@"06"])
        strCarrier = @"中国联通";
    else if ([code isEqualToString:@"03"] || [code isEqualToString:@"05"])
        strCarrier = @"中国电信";
    else if ([code isEqualToString:@"20"])
        strCarrier = @"中国铁通";
    else
        strCarrier = nil;  

    [networkInfo release];  

    return strCarrier;
}  

China - CN

MCC MNC Brand Operator Status Bands (MHz) References and notes
460 00 China Mobile China Mobile Operational GSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010
460 01 China Unicom China Unicom Operational GSM 900 / GSM 1800 / UMTS 2100 CDMA network sold to China Telecom, WCDMA commercial trial started in May 2009 and in full commercial operation as of October 2009.
460 02 China Mobile China Mobile Operational GSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010  
460 03 China Telecom China Telecom Operational CDMA2000 800 / CDMA2000 2100 EV-DO
460 05 China Telecom China Telecom Operational    
460 06 China Unicom China Unicom Operational GSM 900 / GSM 1800 / UMTS 2100  
460 07 China Mobile China Mobile Operational GSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010  
460 20 China Tietong China Tietong Operational GSM-R  

文章转自:http://blog.csdn.net/jiayou8809/article/details/8657974

详细参考:http://en.wikipedia.org/wiki/Mobile_Network_Code

iPhone判断运营商,布布扣,bubuko.com

时间: 2024-12-24 16:32:30

iPhone判断运营商的相关文章

判断手机号归属运营商

1 /** 2 * 手机号归属运营商查询 3 * @param phone 4 */ 5 public static void mobileOperator(String phone) { 6 // cmcc-中国移动手机号码规则 7 String cmccRegex = "^[1]{1}(([3]{1}[4-9]{1})|([5]{1}[89]{1}))[0-9]{8}$"; 8 // cucc-中国联通手机号码规则 9 String cuccRegex = "^[1]{1

android判断网络连接状态、联网类型、运营商

/** * 获取上网方式 * * @param mContext * @return */ public static String getNetType(Context mContext) { String netType = ""; ConnectivityManager connectionManager = (ConnectivityManager) mContext .getSystemService(Context.CONNECTIVITY_SERVICE); Networ

【鉴别】日版iPhone如何通过IMEI查询运营商

SoftBank.au.docomo是日本的三大运营商,以前日本不同运营商的iPhone在型号上进行区分,但iPhone5s/5c上三个运营商的型号都一致,所以无法在型号上对运营商进行区分,本文介绍通过运营商官网查询IMEI确定运营商的方法 [SoftBank]http://www.softbank.jp/mobile/support/3g/restriction/ 可能直接点开是SoftBank首页,多点几次就直接进入查询页面了 [au]http://www.au.kddi.com/suppo

如何判断手机号的运营商.

原文:如何判断手机号的运营商. 源代码下载地址:http://www.zuidaima.com/share/1550463743478784.htm 这个方法是我自己写的一个demo,大家可以看一下.可能这个demo好多人可能涉及不到,收藏或者先保留一份吧,总有一天你会用到的.

android判断手机号的运营商

TextView tv=(TextView)findViewById(R.id.tv); TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); // 获取SIM卡的IMSI码 String imsi = telManager.getSubscriberId(); //半段IMIS中的MNC if(imsi!=null){ if(imsi.startsWith("4

两种方式判断移动运营商

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 /**  * @author Stay  *      判断移动运营商  */ public class NetworkOperater extends Activity {     private static fina

正则表达式判断手机号码属于哪个运营商

#移动号段 1340-1348|135-139|147|150-152|1571-1572|1574|158-159|182|183|187|188 ^1(34[0-8]|(3[5-9]|47|5[0-2]|57[124]|5[89]|8[2378])\\d)\\d{7}$ #联通号段 130|131|132|145|155|156|185|186 ^1(3[0-2]|45|5[56]|8[56])\\d{8}$ #电信号段 133|153|180|189 ^1(33|53|8[09])\\d{

判断手机号码运营商,归属地等信息

CREATE TABLE db_lsxy_ussd.tb_telnum_info ( `id` varchar(32) NOT NULL, `mobile` varchar(10) DEFAULT NULL COMMENT '手机号前缀', `province` varchar(10) DEFAULT NULL COMMENT '省份', `city` varchar(10) DEFAULT NULL COMMENT '城市', `corp` varchar(10) DEFAULT NULL C

判断手机运营商

<!DOCTYPE> <html> <head> <title> New Document </title> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <