How android judges platform information
String board = Build. BOARD; // motherboard String band = Build. BRAND; // android customizer String abi = Build. CPU_ABI; // cpu Instruction Set String aaa = Build. DEVICE; // DEVICE parameter String dis = Build. DISPLAY; // DISPLAY parameter String f = Build. FINGERPRINT; // hardware name String h = Build. HOST; String I = Build. ID; // revision list String m = Build. MANUFACTURER; // hardware MANUFACTURER String mo = Build. MODEL; // version String p = Build. PRODUCT; // mobile phone manufacturer String t = Build. TAGS; // description String aaa = Build Label long ti = Build. TIME; String ty = Build. TYPE; // String aaa = Builder TYPE String u = Build. USER; // The current development code String co = Build. VERSION. CODENAME; // source code control version String inc = Build. VERSION. INCREMENTAL; // version String re = Build. VERSION. RELEASE; // version String sdk = Build. VERSION. SDK; // version int in = Build. VERSION. SDK_INT; // Build. VERSION. SDK_INT can be used with a switch (Build. VERSION. SDK_INT) {case Build. VERSION_CODES.BASE: // 1.0 break; case Build. VERSION_CODES.BASE_1_1: // 1.1 break; case Build. VERSION_CODES.CUPCAKE: // 1.5 break; case Build. VERSION_CODES.CUR_DEVELOPMENT: // current dev versionbreak; case Build. VERSION_CODES.DONUT: // 1.6 break; case Build. VERSION_CODES.ECLAIR: // 2.0 break; case Build. VERSION_CODES.ECLAIR_0_1: // 2.0.1break; case Build. VERSION_CODES.ECLAIR_MR1: // 2.1 break ;}
Expansion:
Android provides a Configuration class that describes all hardware Configuration information related to resources that can be acquired by applications. Contains user-specified information items (local and zoom ratio) and dynamic hardware configurations (a series of input devices ). The Configuration class contains many types of information, such as the system font size, orientation, and input device type. In android development, sometimes we need to adjust the application according to the system settings.