码迷,mamicode.com
首页 > 移动开发 > 详细

关于Android的Build类——获取Android手机设备各种信息

时间:2016-03-13 12:52:58      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:

经常遇到要获取Android手机设备的相关信息,来进行业务的开发,比如经常会遇到要获取CPU的类型来进行so库的动态的下载。而这些都是在Android的Build类里面。相关信息如下:

 private String loadSystemInfo() {
        StringBuilder sb = new StringBuilder();
        sb.append("主板:" + Build.BOARD + "\n");
        sb.append(
                "系统启动程序版本号:" + Build.BOOTLOADER + "\n");
        sb.append(
                "系统定制商:" + Build.BRAND + "\n");
        sb.append("cpu指令集:" + Build.CPU_ABI + "\n");
        sb.append(
                "cpu指令集2" + Build.CPU_ABI2 + "\n");
        sb.append(
                "设置参数: " + Build.DEVICE + "\n");
        sb.append(
                "显示屏参数:" + Build.DISPLAY + "\n");
        sb.append(
                "无线电固件版本:" + Build.getRadioVersion() + "\n");
        sb.append(
                "硬件识别码:" + Build.FINGERPRINT + "\n");
        sb.append(
                " 硬件名称: " + Build.HARDWARE + "\n");
        sb.append(
                " HOST: " + Build.HOST + "\n");
        sb.append(
                "  修订版本列表:" + Build.ID + "\n");
        sb.append(
                "  硬件制造商:" + Build.MANUFACTURER + "\n");
        sb.append(
                " 版本:" + Build.MODEL + "\n");
        sb.append(
                "  硬件序列号:" + Build.SERIAL + "\n");
        sb.append(
                " 手机制造商:" + Build.PRODUCT + "\n");
        sb.append(
                " 描述Build的标签:" + Build.TAGS + "\n");
        sb.append(
                "  TIME:" + Build.TIME + "\n");
        sb.append(
                "  builder类型:" + Build.TYPE + "\n");
        sb.append(
                "  USER:" + Build.USER + "\n");
        MyLog.d(sb.toString());
        return sb.toString();
    }


结束语:用到的知识最好还是要自己跑跑,写一写。

 

 

 

关于Android的Build类——获取Android手机设备各种信息

标签:

原文地址:http://www.cnblogs.com/wytings/p/5260336.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!