欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android 判斷SIM卡屬于哪個(gè)移動(dòng)運(yùn)營商的實(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 = "中國移動(dòng)";  break;
      if (this.IMSI.startsWith("46002"))
       str = "中國移動(dòng)"; break ;
      if (this.IMSI.startsWith("46001"))
        str = "中國聯(lián)通";
      else if (this.IMSI.startsWith("46003"))
        str = "中國電信";
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
         return str;
  }

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

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

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

相關(guān)文章

最新評(píng)論