Android(安卓)判断SIM卡属于哪个移动运营商
16lz
2022-03-16
- publicStringgetProvidersName()
- {
- Stringstr="N/A";
- try
- {
- this.IMSI=this.telephonyManager.getSubscriberId();
- System.out.println(this.IMSI);
- if(this.IMSI.startsWith("46000"))
- str="中国移动";break;
- if(this.IMSI.startsWith("46002"))
- str="中国移动";break;
- if(this.IMSI.startsWith("46001"))
- str="中国联通";
- elseif(this.IMSI.startsWith("46003"))
- str="中国电信";
- }
- catch(ExceptionlocalException)
- {
- localException.printStackTrace();
- }
- returnstr;
- }
更多相关文章
- 取值 1111
- Android(安卓)兼容获取Mac地址与手机信息工具
- Android(安卓)APN设置 获取APN列表
- AIR Native Extension的使用(Android)一 : 打包ane
- Android(安卓)识别SIM卡类型
- Android开始-3G应用之android
- android 打开/关闭 移动网络
- android APN的打开与关闭
- Android(安卓)APN设置