編輯:關於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";
}
導航關於這個導航也是困擾了我好長的一段時間的 現在終於整理出來了,來給大家分享一下 其實簡單的 ,在百度的API把他的示例dome下載下來就好了-然後我告訴你要用哪些。百
刷機是什麼意思?其實簡單來說就是給平板電腦重裝系統,當你的電腦遇到所有問題都可以使用刷機來解決,比如忘記密碼鎖、進不去系統等,使用刷機都可以輕松搞定,那麼我
一,Activity生命周期相信不少朋友也已經看過這個流程圖了,也基本了解了Activity生命周期的幾個過程,我們就來說一說一些常見操作的生命周期執行情況吧(1) 啟動
訪問網絡圖片是很普遍的事了,在前面的學習中,我也寫過了幾次異步網上請求網絡圖片,但是沒有緩存圖片,那麼我們也都知道,有時候訪問一些經常訪問的網絡圖片,如果不采取緩存的形式
官方有話這樣說: A RemoteViews object (and