Android code used to obtain information such as mobile phones and system versions

Source: Internet
Author: User

[Html] Sometimes you need to calculate the phone model and version number, and use the program to obtain the corresponding phone information. Compared with the two mobile phones, we found that different manufacturers have different display methods for a specific information, for details, see:
Sometimes you need to calculate the phone model and version number, and use the program to obtain the corresponding phone information. Comparing the two phone numbers, we found that different manufacturers have different display methods. For details, see:
[Html]
[Html] String phoneInfo = "Product:" + android. OS. Build. PRODUCT;
PhoneInfo + = ", CPU_ABI:" + android. OS. Build. CPU_ABI;
PhoneInfo + = ", TAGS:" + android. OS. Build. TAGS;
PhoneInfo + = ", VERSION_CODES.BASE:" + android. OS. Build. VERSION_CODES.BASE;
PhoneInfo + = ", MODEL:" + android. OS. Build. MODEL;
PhoneInfo + = ", SDK:" + android. OS. Build. VERSION. SDK;
PhoneInfo + = ", VERSION. RELEASE:" + android. OS. Build. VERSION. RELEASE;
PhoneInfo + = ", DEVICE:" + android. OS. Build. DEVICE;
PhoneInfo + = ", DISPLAY:" + android. OS. Build. DISPLAY;
PhoneInfo + = ", BRAND:" + android. OS. Build. BRAND;
PhoneInfo + = ", BOARD:" + android. OS. Build. BOARD;
PhoneInfo + = ", FINGERPRINT:" + android. OS. Build. FINGERPRINT;
PhoneInfo + = ", ID:" + android. OS. Build. ID;
PhoneInfo + = ", MANUFACTURER:" + android. OS. Build. MANUFACTURER;
PhoneInfo + = ", USER:" + android. OS. Build. USER;
// Toast. makeText (this, phoneInfo, Toast. LENGTH_LONG). show ();
TextView t = (TextView) findViewById (R. id. main_phoneinfo );
T. setText (phoneInfo );


From xiechengfa's column

Related Article

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.