首页 > 代码库 > 获取手机信息

获取手机信息

 1  public void getPhoneInfo() { 2   TelephonyManager tm = (TelephonyManager) this.getSystemService(TELEPHONY_SERVICE); 3   String mtyb = android.os.Build.BRAND;// 手机品牌 4   String mtype = android.os.Build.MODEL; // 手机型号 5   String imei = tm.getDeviceId(); 6   String imsi = tm.getSubscriberId(); 7   String numer = tm.getLine1Number(); // 手机号码 8   String serviceName = tm.getSimOperatorName(); // 运营商 9   tvPhoneInfo.setText("品牌: " + mtyb + "\n" + "型号: " + mtype + "\n" + "版本: Android " + android.os.Build.VERSION.RELEASE + "\n" + "IMEI: " + imei10     + "\n" + "IMSI: " + imsi + "\n" + "手机号码: " + numer + "\n" + "运营商: " + serviceName + "\n");11  }

 

获取手机信息