亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Android 判斷SIM卡屬于哪個(gè)移動(dòng)運(yùn)營(yíng)商的實(shí)現(xiàn)代碼

 更新時(shí)間:2013年05月20日 12:55:47   作者:  
有時(shí)候我們需要在Android中獲取本機(jī)網(wǎng)絡(luò)提供商呢,這里簡(jiǎn)單分享下,方便需要的朋友

復(fù)制代碼 代碼如下:

[java]
public String getProvidersName()
  {
    String str = "N/A";
    try
    {
      this.IMSI = this.telephonyManager.getSubscriberId();
      System.out.println(this.IMSI);
      if (this.IMSI.startsWith("46000"))
       str = "中國(guó)移動(dòng)";  break;
      if (this.IMSI.startsWith("46002"))
       str = "中國(guó)移動(dòng)"; break ;
      if (this.IMSI.startsWith("46001"))
        str = "中國(guó)聯(lián)通";
      else if (this.IMSI.startsWith("46003"))
        str = "中國(guó)電信";
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
         return str;
  }

注意申明:
[java]
復(fù)制代碼 代碼如下:

this.telephonyManager = ((TelephonyManager)paramContext.getSystemService("phone"));

就這么簡(jiǎn)單。。。。

相關(guān)文章

最新評(píng)論