Android Build obtains system information

Source: Internet
Author: User
Build to obtain information about the system (software)
  1. Build. BOARD // Motherboard
  2. Build. BRAND // Android customizer
  3. Build. CPU_ABI // cpu Instruction Set
  4. Build. DEVICE // DEVICE Parameters
  5. Build. DISPLAY // DISPLAY parameters
  6. Build. FINGERPRINT // hardware name
  7. Build. HOST
  8. Build. ID // revision list
  9. Build. MANUFACTURER // hardware MANUFACTURER
  10. Build. MODEL // version
  11. Build. PRODUCT // mobile phone manufacturer
  12. Build. TAGS // describe the build tag
  13. Build. TIME
  14. Build. TYPE // builder TYPE
  15. Build. USER

Build. VERSION: obtains the VERSION information of the android system.

 

  1. // Current development code
  2. Build. VERSION. CODENAME
  3. // Source code control version
  4. Build. VERSION. INCREMENTAL
  5. // Version string
  6. Build. VERSION. RELEASE
  7. // Version number
  8. Build. VERSION. SDK
  9. // Version number
  10. Build. VERSION. SDK_INT
  11. // Build. VERSION. SDK_INT can be used with the switch
  12. Switch(Build. VERSION. SDK_INT ){
  13. CaseBuild. VERSION_CODES.BASE: // 1.0
  14.  Break;
  15. CaseBuild. VERSION_CODES.BASE_1_1: // 1.1
  16.  Break;
  17. CaseBuild. VERSION_CODES.CUPCAKE: // 1.5
  18.  Break;
  19. CaseBuild. VERSION_CODES.CUR_DEVELOPMENT: // current dev version
  20.  Break;
  21. CaseBuild. VERSION_CODES.DONUT: // 1.6
  22.  Break;
  23. CaseBuild. VERSION_CODES.ECLAIR: // 2.0
  24.  Break;
  25. CaseBuild. VERSION_CODES.ECLAIR_0_1: // 2.0.1
  26.  Break;
  27. CaseBuild. VERSION_CODES.ECLAIR_MR1: // 2.1
  28.  Break;
  29. }

Wrote a test case: http://download.csdn.net/detail/qeqeqe236/4499512

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.