现在的位置: 首页 > 综合 > 正文

android.os.Build认识

2014年03月11日 ⁄ 综合 ⁄ 共 1912字 ⁄ 字号 评论关闭

关于Build类的介绍
这个类为一个获取设备一些初始化信息的类,该类的主要信息都是通过一些static的字段获得:

public static final String BOARD --->The name of the underlying board, like "goldfish".(设备厂商)
public static final String BOOTLOADER  --->The system bootloader version number.
public static final String BRAND  --->The brand (e.g., carrier) the software is customized for, if any.
public static final String CPU_ABI ---> The name of the instruction set (CPU type + ABI convention) of native code.
public static final String CPU_ABI2 ---> The name of the second instruction set (CPU type + ABI convention) of native code.
public static final String DEVICE  --->The name of the industrial design.
public static final String DISPLAY  --->A build ID string meant for displaying to the user
public static final String FINGERPRINT  --->A string that uniquely identifies this build.
public static final String HARDWARE ---> ---> The name of the hardware (from the kernel command line or /proc).
public static final String HOST
public static final String ID  --->Either a changelist number, or a label like "M4-rc20".
public static final String MANUFACTURER ---> The manufacturer of the product/hardware.
public static final String MODEL  --->The end-user-visible name for the end product.(设备名)
public static final String PRODUCT ---> The name of the overall product.
public static final String RADIO  --->This field is deprecated. The radio firmware version is frequently not available when this class is initialized, leading to ablank or "unknown" value
for this string. Use getRadioVersion() instead.
public static final String SERIAL  --->A hardware serial number, if available.
public static final String TAGS  --->Comma-separated tags describing the build, like "unsigned,debug".
public static final long TIME
public static final String TYPE  --->The type of build, like "user" or "eng".
public static final String USER

例如:

Log.i( LOG_TAG, "device: " + android.os.Build.DEVICE );
Log.i( LOG_TAG, "cpu: " + android.os.Build.CPU_ABI );
Log.i( LOG_TAG, "cpu2: " + android.os.Build.CPU_ABI2 );
Log.i( LOG_TAG, "manufacter: " + android.os.Build.MANUFACTURER );
Log.i( LOG_TAG, "model: " + android.os.Build.MODEL );
Log.i( LOG_TAG, "product: " + android.os.Build.PRODUCT );

抱歉!评论已关闭.