Archive for the ‘手机开发’ tag
Android开发日志 得到手机版本号
今天弄日程的时候发现的..
2.0+ 和2.0- 的日程url不一样..
那么就需要得到手机的版本号..
其实android sdk里面是带有这个的
import android.os.Build;
这个里面不仅仅可以得到手机的版本号.还可以得到很多数据..
比如牌子..CPU芯片..等等参数
下表为sdk里面的说明
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | BOARD | The name of the underlying board, like "goldfish". | |||||||||
String | BOOTLOADER | The system bootloader version number. | |||||||||
String | BRAND | The brand (e.g., carrier) the software is customized for, if any. | |||||||||
String | CPU_ABI | The name of the instruction set (CPU type + ABI convention) of native code. | |||||||||
String | CPU_ABI2 | The name of the second instruction set (CPU type + ABI convention) of native code. | |||||||||
String | DEVICE | The name of the industrial design. | |||||||||
String | DISPLAY | A build ID string meant for displaying to the user | |||||||||
String | FINGERPRINT | A string that uniquely identifies this build. | |||||||||
String | HARDWARE | The name of the hardware (from the kernel command line or /proc). | |||||||||
String | HOST | ||||||||||
String | ID | Either a changelist number, or a label like "M4-rc20". | |||||||||
String | MANUFACTURER | The manufacturer of the product/hardware. | |||||||||
String | MODEL | The end-user-visible name for the end product. | |||||||||
String | PRODUCT | The name of the overall product. | |||||||||
String | RADIO | The radio firmware version number. | |||||||||
String | TAGS | Comma-separated tags describing the build, like "unsigned,debug". | |||||||||
long | TIME | ||||||||||
String | TYPE | The type of build, like "user" or "eng". | |||||||||
String | UNKNOWN | Value used for when a build property is unknown. | |||||||||
String | USER |