经常遇到要获取Android手机设备的相关信息,来进行业务的开发,比如经常会遇到要获取CPU的类型来进行so库的动态的下载。而这些都是在Android的Build类里面。相关信息如下:
private String loadSystemInfo() {
StringBuilder sb = new StringBuilder();
sb.append("主板:" + Build.BOARD + "
");
sb.append(
"系统启动程序版本号:" + Build.BOOTLOADER + "
");
sb.append(
"系统定制商:" + Build.BRAND + "
");
sb.append("cpu指令集:" + Build.CPU_ABI + "
");
sb.append(
"cpu指令集2" + Build.CPU_ABI2 + "
");
sb.append(
"设置参数: " + Build.DEVICE + "
");
sb.append(
"显示屏参数:" + Build.DISPLAY + "
");
sb.append(
"无线电固件版本:" + Build.getRadioVersion() + "
");
sb.append(
"硬件识别码:" + Build.FINGERPRINT + "
");
sb.append(
" 硬件名称: " + Build.HARDWARE + "
");
sb.append(
" HOST: " + Build.HOST + "
");
sb.append(
" 修订版本列表:" + Build.ID + "
");
sb.append(
" 硬件制造商:" + Build.MANUFACTURER + "
");
sb.append(
" 版本:" + Build.MODEL + "
");
sb.append(
" 硬件序列号:" + Build.SERIAL + "
");
sb.append(
" 手机制造商:" + Build.PRODUCT + "
");
sb.append(
" 描述Build的标签:" + Build.TAGS + "
");
sb.append(
" TIME:" + Build.TIME + "
");
sb.append(
" builder类型:" + Build.TYPE + "
");
sb.append(
" USER:" + Build.USER + "
");
MyLog.d(sb.toString());
return sb.toString();
}
结束语:用到的知识最好还是要自己跑跑,写一写。