Skip to content

AndroidDeviceInfo 继承自: DeviceInfo

Android 设备及模拟器的设备信息快照。

在 Android 上由 get_device_info 返回。

属性 ​

名称类型默认值说明
available_ram_sizeintrequiredTotal available RAM size in bytes.
boardstrrequiredThe name of the underlying board, like "goldfish". More info: https://developer.android.com/reference/android/os/Build#BOARD
bootloaderstrrequiredThe system bootloader version number. More info: https://developer.android.com/reference/android/os/Build#BOOTLOADER
brandstrrequiredThe consumer-visible brand with which the product/hardware will be associated, if any. More info: https://developer.android.com/reference/android/os/Build#BRAND
devicestrrequiredThe name of the industrial design. More info: https://developer.android.com/reference/android/os/Build#DEVICE
displaystrrequiredA build ID string meant for displaying to the user. More info: https://developer.android.com/reference/android/os/Build#DISPLAY
fingerprintstrrequiredA string that uniquely identifies this build. More info: https://developer.android.com/reference/android/os/Build#FINGERPRINT
free_disk_sizeintrequiredFree disk size in bytes.
hardwarestrrequiredThe name of the hardware (from the kernel command line or /proc). More info: https://developer.android.com/reference/android/os/Build#HARDWARE
hoststrrequiredHostname. More info: https://developer.android.com/reference/android/os/Build#HOST
idstrrequiredEither a changelist number, or a label like "M4-rc20". More info: https://developer.android.com/reference/android/os/Build#ID
is_low_ram_deviceboolrequiredTrue if the application is running on a low-RAM device, False otherwise.
is_physical_deviceboolrequiredFalse if the application is running in an emulator, True otherwise.
manufacturerstrrequiredThe manufacturer of the product/hardware. More info: https://developer.android.com/reference/android/os/Build#MANUFACTURER
modelstrrequiredThe end-user-visible name for the end product. More info: https://developer.android.com/reference/android/os/Build#MODEL
namestrrequiredThe name of the device.
physical_ram_sizeintrequiredTotal physical RAM size in bytes.
productstrrequiredThe name of the overall product. More info: https://developer.android.com/reference/android/os/Build#PRODUCT
supported_32_bit_abislist[str]requiredAn ordered list of 32 bit ABIs supported by this device. Available only on Android L (API 21) and newer. More info: https://developer.android.com/reference/android/os/Build#SUPPORTED_32_BIT_ABIS
supported_64_bit_abislist[str]requiredAn ordered list of 64 bit ABIs supported by this device. Available only on Android L (API 21) and newer. More info: https://developer.android.com/reference/android/os/Build#SUPPORTED_64_BIT_ABIS
supported_abislist[str]requiredAn ordered list of ABIs supported by this device. Available only on Android L (API 21) and newer. More info: https://developer.android.com/reference/android/os/Build#SUPPORTED_ABIS
system_featureslist[str]requiredDescribes what features are available on the current device. This can be used to check if the device has, for example, a front-facing camera, or a touchscreen. However, in many cases this is not the best API to use. For example, if you are interested in bluetooth, this API can tell you if the device has a bluetooth radio, but it cannot tell you if bluetooth is currently enabled, or if you have been granted the necessary permissions to use it. Please only use this if there is no other way to determine if a feature is supported. This data comes from Android's PackageManager.getSystemAvailableFeatures, and many of the common feature strings to look for are available in PackageManager's public documentation: https://developer.android.com/reference/android/content/pm/PackageManager
tagsstrrequiredComma-separated tags describing the build, like "unsigned,debug". More info: https://developer.android.com/reference/android/os/Build#TAGS
total_disk_sizeintrequiredTotal disk size in bytes.
typestrrequiredThe type of build, like "user" or "eng". More info: https://developer.android.com/reference/android/os/Build#TYPE
versionAndroidBuildVersionrequiredAndroid operating system version values derived from android.os.Build.VERSION.
localeslist[Locale]requiredThe full system-reported supported locales of the device. This establishes the language and formatting conventions that application should, if possible, use to render their user interface. The list is ordered in order of priority, with lower-indexed locales being preferred over higher-indexed ones. The first element is the primary locale. The on_locale_change event is called whenever this value changes.

关注我,学习大模型、大数据、Python等热门技术。