android设备信息

android的设备信息可以通过android.os.Build获取,具体的信息如下:

一、类结构:

java.lang.Object
?android.os.Build

二、类概述:从系统属性中提取设备硬件和版本信息。

三、内部类:

1、Build.VERSION 各种版本字符串

2、Build.VERSION_CODES 目前已知的版本代码的枚举类

四、常量:UNKNOWN 当一个版本属性不知道时所设定的值。其字符串值为 unknown .

五、构造方法: Build ()

六、静态属性

1、BOARD 主板:The name of the underlying board, like goldfish.

2、BOOTLOADER 系统启动程序版本号:The system bootloader version number.

3、BRAND 系统定制商:The consumer-visible brand with which the product/hardware will be associated, if any.

4、CPU_ABI cpu指令集:The name of the instruction set (CPU type + ABI convention) of native code.

5、CPU_ABI2 cpu指令集2:The name of the second instruction set (CPU type + ABI convention) of native code.

6、DEVICE 设备参数:The name of the industrial design.

7、DISPLAY 显示屏参数:A build ID string meant for displaying to the user

8、FINGERPRINT 唯一识别码:A string that uniquely identifies this build. Do not attempt to parse this value.

9、HARDWARE 硬件名称:The name of the hardware (from the kernel command line or /proc).

10、HOST

11、ID 修订版本列表:Either a changelist number, or a label like M4-rc20.

12、MANUFACTURER 硬件制造商:The manufacturer of the product/hardware.

13、MODEL 版本即最终用户可见的名称:The end-user-visible name for the end product.

14、PRODUCT 整个产品的名称:The name of the overall product.

15、RADIO 无线电固件版本:The radio firmware version number. 在API14后已过时。使用 getRadioVersion()代替。

16、SERIAL 硬件序列号:A hardware serial number, if available. Alphanumeric only, case-insensitive.

17、TAGS 描述build的标签,如未签名,debug等等。:Comma-separated tags describing the build, like unsigned,debug.

18、TIME

19、TYPE build的类型:The type of build, like user or eng.

20、USER

七、公共方法:

public static String getRadioVersion() 获取无线电固件版本


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android 获取设备信息是一种常见的操作,通过获取设备信息,开发者可以了解到设备的各种属性,并根据这些信息进行相应的处理。 在 Android 平台上,获取设备信息可以通过调用系统提供的 API 实现。以下是一个获取设备信息的简单示例代码: ``` import android.os.Build; public class DeviceInfoDemo { public static void main(String[] args) { String deviceModel = Build.MODEL; // 获取设备型号 String deviceManufacturer = Build.MANUFACTURER; // 获取设备制造商 String deviceBrand = Build.BRAND; // 获取设备品牌 String deviceType = Build.TYPE; // 获取设备类型 String deviceOSVersion = Build.VERSION.RELEASE; // 获取操作系统版本号 System.out.println("设备型号:" + deviceModel); System.out.println("设备制造商:" + deviceManufacturer); System.out.println("设备品牌:" + deviceBrand); System.out.println("设备类型:" + deviceType); System.out.println("操作系统版本号:" + deviceOSVersion); } } ``` 以上代码使用了`Build`类提供的一些常用属性来获取设备信息,并将其打印输出。开发者可以根据实际需求获取更多的设备信息,例如 MAC 地址、IMEI 号等。 需要注意的是,为了使用`Build`类中的属性,需要在项目的`AndroidManifest.xml`文件中添加相应的权限声明。例如获取设备的 IMEI 号需要`android.permission.READ_PHONE_STATE`权限。 通过上述示例代码,开发者可以轻松获取 Android 设备的各种信息,这些信息对于开发、统计、调试等方面非常有用。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值