第一种方法:
获取手机的IMSI码,并判断是中国移动中国联通中国电信
TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imsi = telManager.getSubscriberId();
if(imsi!=null){
if(imsi.startsWith("46000") || imsi.startsWith("46002")){//因为移动网络编号46000下的IMSI已经用完,所以虚拟了一个46002编号,134/159号段使用了此编号
//中国移动
}else if(imsi.startsWith("46001")){
//中国联通
}else if(imsi.startsWith("46003")){
//中国电信
}
}
第二种方法
TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String operator = telManager.getSimOperator();
if(operator!=null){
if(operator.equals("46000") || operator.equals("46002")){
//中国移动
}else if(operator.equals("46001")){
//中国联通
}else if(operator.equals("46003")){
//中国电信
}
}
以上所述是小编给大家介绍的Android 判断SIM卡是中国移动中国联通中国电信(移动运营商),希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!



