zoukankan      html  css  js  c++  java
  • 关于Android的Build类——获取Android手机设备各种信息

    经常遇到要获取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();
        }


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

     

     

  • 相关阅读:
    使用Vue快速开发单页应用
    轻松入门React和Webpack
    使用Redux管理你的React应用
    深入理解 react-router 路由系统
    webpack学习之路
    webpack编译流程漫谈
    HTML5无刷新修改Url,history pushState/replaceState
    gulp的流与执行顺序
    RequireJS对文件合并与压缩实现方法
    RequireJS模块化后JS压缩合并
  • 原文地址:https://www.cnblogs.com/wytings/p/5260336.html
Copyright © 2011-2022 走看看