Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> android手機信息表

android手機信息表

編輯:關於Android編程

String brand 商標
String model 手機型號
String serialno 序列號
String android_id 設備ID
String release android版本
String sdk 最小兼容版本
String bid 系統版本編號
String manufacturer 廠商
String product 銷往地
String cpu_abi CPU類型
String display ROM編號名稱
String device
 
String fingerprint 廠商/制造地
String imei IMEI
String imsi 移動用戶識別碼
String devicesoftwareversion 設備的軟件版本號
String phonenum 電話號碼
String phonetype 電話狀態
String simserialnumber ICCID(SIM串號)
String simcountryiso ISO國家碼(SIM卡的國家碼)
String simoperator 移動網絡碼(SIM卡提供的移動國家碼)
String simoperatorname 服務商名稱(中國聯通,中國電信)
String simstate SIM狀態(沒插卡,就緒,鎖定)
String voicemailnumber 獲取語音郵件號碼
String networkcountryiso ISO標准的國家碼
String networkoperator 全球運營商MCC+MNC
String networkoperatorname; 名字(中國聯通,中國電信)
String networktype 當前使用的網絡類型
String wifiadess; 網卡地址
String bluetoothadess 藍牙地址
String screensize 屏幕像素
String screendensity 比例因子:顯示器的邏輯密度
String getcid GSM位置區值
String getlac GSM位置區碼
 

 

                try {
   brand = Build.BRAND;
  } catch (Exception e) {
   brand = "NULL";
  }
  try {
   model = Build.MODEL;
  } catch (Exception e) {
   model = "NULL";
  }
  try {
   Class<?> c = Class.forName("android.os.SystemProperties");
   Method get = c.getMethod("get", String.class);
   serialno = (String) get.invoke(c, "ro.serialno");
  } catch (Exception ignored) {
   serialno = "NULL";
  }
  try {
   android_id = Secure.getString(this.getContentResolver(),
     Secure.ANDROID_ID);
  } catch (Exception e) {
   android_id = "NULL";
  }
  try {
   release = Build.VERSION.RELEASE;
  } catch (Exception e) {
   release = "NULL";
  }
  try {
   sdk = Build.VERSION.SDK;
  } catch (Exception e) {
   sdk = "NULL";
  }
  try {
   bid = Build.ID;
  } catch (Exception e) {
   bid = "NULL";
  }
  try {
   manufacturer = Build.MANUFACTURER;
  } catch (Exception e) {
   manufacturer = "NULL";
  }
  try {
   product = Build.PRODUCT;
  } catch (Exception e) {
   product = "NULL";
  }

  try {
   cpu_abi = Build.CPU_ABI;
  } catch (Exception e) {
   cpu_abi = "NULL";
  }

  try {
   display = Build.DISPLAY;
  } catch (Exception e) {
   display = "NULL";
  }

  try {
   device = Build.DEVICE;
  } catch (Exception e) {
   device = "NULL";
  }

  try {
   fingerprint = Build.FINGERPRINT;
  } catch (Exception e) {
   fingerprint = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   imei = tm.getDeviceId();
  } catch (Exception e) {
   imei = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   imsi = tm.getSubscriberId();
  } catch (Exception e) {
   imsi = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   devicesoftwareversion = tm.getDeviceSoftwareVersion();
  } catch (Exception e) {
   devicesoftwareversion = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   phonenum = tm.getLine1Number();
  } catch (Exception e) {
   phonenum = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   phonetype = Integer.toString(tm.getPhoneType());
  } catch (Exception e) {
   phonetype = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   simserialnumber = tm.getSimSerialNumber();
  } catch (Exception e) {
   simserialnumber = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   simcountryiso = tm.getSimCountryIso();
  } catch (Exception e) {
   simcountryiso = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   simoperator = tm.getSimOperator();
  } catch (Exception e) {
   simoperator = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   simoperatorname = tm.getSimOperatorName();
  } catch (Exception e) {
   simoperatorname = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   simstate = Integer.toString(tm.getSimState());
  } catch (Exception e) {
   simstate = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   voicemailnumber = tm.getVoiceMailNumber();
  } catch (Exception e) {
   voicemailnumber = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   networkcountryiso = tm.getNetworkCountryIso();
  } catch (Exception e) {
   networkcountryiso = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   networkoperator = tm.getNetworkOperator();
  } catch (Exception e) {
   networkoperator = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   networkoperatorname = tm.getNetworkOperatorName();
  } catch (Exception e) {
   networkoperatorname = "NULL";
  }

  try {
   TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   networktype = Integer.toString(tm.getNetworkType());
  } catch (Exception e) {
   networktype = "NULL";
  }

  try {
   WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
   WifiInfo info = wifi.getConnectionInfo();
   wifiadess = info.getMacAddress();
  } catch (Exception e) {
   wifiadess = "NULL";
  }

  try {
   BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
   bluetoothadess = adapter.getAddress();
  } catch (Exception e) {
   bluetoothadess = "NULL";
  }

  try {
   DisplayMetrics dm = new DisplayMetrics();
   getWindowManager().getDefaultDisplay().getMetrics(dm);
   int widthPixels = dm.widthPixels;
   int heightPixels = dm.heightPixels;
   screensize = Integer.toString(widthPixels) + "*"
     + Integer.toString(heightPixels);
  } catch (Exception e) {
   screensize = "NULL";
  }

  try {
   DisplayMetrics dm = new DisplayMetrics();
   getWindowManager().getDefaultDisplay().getMetrics(dm);
   float density = dm.density;
   screendensity = Float.toString(density);
  } catch (Exception e) {
   screendensity = "NULL";
  }

  try {
   TelephonyManager tel;
   tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   CellLocation cellLocation = tel.getCellLocation();
   GsmCellLocation gsmCellLocation = (GsmCellLocation) cellLocation;
   getcid = Integer.toString(gsmCellLocation.getCid());
  } catch (Exception e) {
   getcid = "NULL";
  }

  try {
   TelephonyManager tel;
   tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
   CellLocation cellLocation = tel.getCellLocation();
   GsmCellLocation gsmCellLocation = (GsmCellLocation) cellLocation;
   getlac = Integer.toString(gsmCellLocation.getLac());
  } catch (Exception e) {
   getlac = "NULL";
  }

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved