1 String phoneInfo = "Product: " + android.os.Build.PRODUCT; 2 phoneInfo += "\n CPU_ABI: " + android.os.Build.CPU_ABI; 3 phoneInfo += "\n TAGS: " + android.os.Build.TAGS; 4 phoneInfo += "\n VERSION_CODES.BASE: " + android.os.Build.VERSION_CODES.BASE; 5 phoneInfo += "\n MODEL: " + android.os.Build.MODEL; 6 phoneInfo += "\n SDK: " + android.os.Build.VERSION.SDK; 7 phoneInfo += "\n VERSION.RELEASE: " + android.os.Build.VERSION.RELEASE; 8 phoneInfo += "\n DEVICE: " + android.os.Build.DEVICE; 9 phoneInfo += "\n DISPLAY: " + android.os.Build.DISPLAY; 10 phoneInfo += "\n BRAND: " + android.os.Build.BRAND; 11 phoneInfo += "\n BOARD: " + android.os.Build.BOARD; 12 phoneInfo += "\n FINGERPRINT: " + android.os.Build.FINGERPRINT; 13 phoneInfo += "\n ID: " + android.os.Build.ID; 14 phoneInfo += "\n MANUFACTURER: " + android.os.Build.MANUFACTURER; 15 phoneInfo += "\n USER: " + android.os.Build.USER; 16 try 17 { 18 PackageManager packageManager = getPackageManager(); 19 // getPackageName()是你当前类的包名,0代表是获取版本信息 20 PackageInfo packInfo = packageManager.getPackageInfo(getPackageName(), 0); 21 phoneInfo += "\n APPVER: " + packInfo.versionCode; 22 } 23 catch (NameNotFoundException e) 24 { 25 e.printStackTrace(); 26 } 27 phoneInfo += "\n Language: " + Locale.getDefault().getLanguage(); 28 29 ConnectivityManager conn = (ConnectivityManager) ScActivity.this.getSystemService(Context.CONNECTIVITY_SERVICE); 30 conn.getActiveNetworkInfo().getTypeName();//MOBILE->GPRS;WIFI 31 phoneInfo += "\n network: " + conn.getActiveNetworkInfo().getTypeName();
对应的信息:
Product: full_m805_892x_evm
CPU_ABI: armeabi-v7a
TAGS: test-keys
VERSION_CODES.BASE: 1
MODEL: azt7012h
SDK: 15
VERSION.RELEASE: 4.0.4
DEVICE: m805_892x
DISPLAY: 20121210_ver1.0
BRAND: Android
BOARD: m805_892x_evm
FINGERPRINT: Android/full_m805_892x_evm/m805_892x:4.0.4/IMM76D/eng.watt.20120826.153847:eng/test-keys
ID: IMM76D
MANUFACTURER: telechips
USER: watt
APPVER: 2
Language: zh
network: WIFI