Android 判断SIM卡属于哪个移动运营商维护要多久详解

Android这样获取本机网络提供商呢?请看下面代码:
public String getProvidersName()
String str = "N/A";
this.IMSI = this.telephonyManager.getSubscriberId();
System.out.println(this.IMSI);
if (this.IMSI.startsWith("46000"))
str = "中国移动";
if (this.IMSI.startsWith("46002"))
str = "中国移动";
if (this.IMSI.startsWith("46001"))
str = "中国联通";
else if (this.IMSI.startsWith("46003"))
str = "中国电信";
catch (Exception localException)
localException.printStackTrace();
注意申明:
this.telephonyManager = ((TelephonyManager)paramContext.getSystemService("phone"));
就这么简单。。。。
Android获取运营商信息
android运营商和网络类型分析
没有更多推荐了,Android 获取手机SIM卡运营商
直接上代码:
* 获取SIM卡运营商
* @param context
public static String getOperators(Context context) {
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
String operator =
String IMSI = tm.getSubscriberId();
if (IMSI == null || IMSI.equals("")) {
if (IMSI.startsWith("46000") || IMSI.startsWith("46002")) {
operator = "中国移动";
} else if (IMSI.startsWith("46001")) {
operator = "中国联通";
} else if (IMSI.startsWith("46003")) {
operator = "中国电信";
* 手机型号
public static String getPhoneModel() {
return android.os.Build.MODEL;
public static String getSystemVersion() {
return android.os.Build.VERSION.RELEASE;对于运营商的区别,写下以下方法:
private void CheckOperators()
TelephonyManager telmaManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String sendNum = "";
String imsiString = telmaManager.getSubscriberId();
if(imsiString != null)
if(imsiString.startsWith("46000") || imsiString.startsWith("46002"))
// 因为移动网络编号46000下的IMSI已经用完,所以虚拟了一个46002编号,134/159号段使用了此编号
else if(imsiString.startsWith("46001")){
//中国联通
else if (imsiString.startsWith("46003")) {
//中国电信
}有好的方法希望大神来交流!
补充更新:
移动:4,4;
联通:4,46009;
电信:4,46011;
运营商代码
通过IMSI判断运营商的方法
通过IMSI运营商判断[Android]
Android运营商名称的显示规则
利用IMSI码区分手机网络运营商
android 获取sim卡运营商信息
根据手机sim卡获取运营商信息
没有更多推荐了,Android 获取网络连接方式、判断手机卡所属运营商
我的图书馆
Android 获取网络连接方式、判断手机卡所属运营商
* 获取手机卡类型,移动、联通、电信
*/ private static int getMobileType(Context context) { int type = 0; TelephonyManager iPhoneManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String iNumeric = iPhoneManager.getSimOperator(); if (iNumeric.length() & 0) { if (iNumeric.equals("46000") || iNumeric.equals("46002")) { // 中国移动 } else if (iNumeric.equals("46001")) { // 中国联通 } else if (iNumeric.equals("46003")) { // 中国电信 } } }
[转]&[转]&[转]&[转]&[转]&
喜欢该文的人也喜欢判断是否有sim卡的方法:
int absent = TelephonyManager.SIM_STATE_ABSENT;
if (1 == absent)
Log.d(TAG,"请确认sim卡是否插入或者sim卡暂时不可用!");
判断是哪个运营商的
TelephonyManager telManager = (TelephonyManager) getSystemService(Activity.TELEPHONY_SERVICE);
String operator = telManager.getSimOperator();
Log.d(TAG,"operator:"+operator);
if(operator!=null)
if(operator.equals("46000") || operator.equals("46002"))
Log.d(TAG,"中国移动");
}else if(operator.equals("46001")){
Log.d(TAG,"中国联通");
}else if(operator.equals("46003")){
Log.d(TAG,"中国电信");
阅读(...) 评论()}

我要回帖

更多关于 移动运营商电话是多少 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信