How android judges platform information

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.