Get Android System Information

Source: Internet
Author: User

private void GetSystemInfo ()

{

String phoneinfo = "Product:" + Android.os.Build.PRODUCT;

Phoneinfo + = "\ncpu_abi:" + Android.os.Build.CPU_ABI;

Phoneinfo + = "\ntags:" + Android.os.Build.TAGS;

Phoneinfo + = "\nversion_codes. BASE: "+ Android.os.Build.VERSION_CODES. BASE;

Phoneinfo + = "\nmodel:" + Android.os.Build.MODEL;

Phoneinfo + = "\NSDK:" + Android.os.Build.VERSION.SDK;

Phoneinfo + = "\nversion.release:" + Android.os.Build.VERSION.RELEASE;

Phoneinfo + = "\ndevice:" + Android.os.Build.DEVICE;

Phoneinfo + = "\ndisplay:" + Android.os.Build.DISPLAY;

Phoneinfo + = "\nbrand:" + Android.os.Build.BRAND;

Phoneinfo + = "\nboard:" + Android.os.Build.BOARD;

Phoneinfo + = "\nfingerprint:" + Android.os.Build.FINGERPRINT;

Phoneinfo + = "\nid:" + Android.os.Build.ID;

Phoneinfo + = "\nmanufacturer:" + Android.os.Build.MANUFACTURER;

Phoneinfo + = "\nuser:" + Android.os.Build.USER;

Phoneinfo + = "\nhardware:" + Android.os.Build.HARDWARE;

Sysinfo.settext (Phoneinfo);

}


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/4D/C8/wKiom1RZvLCTlqh_AAGiA5JAtuQ221.jpg "title=" Picture 1.png "alt=" Wkiom1rzvlctlqh_aagia5jatuq221.jpg "/>


Note: The above is a non-brain string splicing, we recommend that you use the string concatenation when using the StringBuilder class append () method to splice, because the string is immutable, in each + new string, you have to reallocate memory, inefficient, although you do not feel, But it is not advisable to use this. And the efficiency of StringBuilder is much higher.


A brief summary is as follows:

Comparison of the three in execution speed:StringBuilder > StringBuffer > String

1. If you want to manipulate a small amount of data with string

2. Single-threaded operation string buffers operating large amounts of data with StringBuilder

3. Multi-threaded operation string buffer operation of large amounts of data with StringBuffer

StringBuilder: Thread is not secure

StringBuffer: Thread-safe

When we are using a string buffer to be used by multiple threads, the JVM does not guarantee that the StringBuilder operation is safe, although he is the fastest, but can ensure that the StringBuffer can be operated correctly. Of course, most of the time we are in a single-threaded operation, so in most cases it is recommended to use StringBuilder instead of StringBuffer, which is the reason for speed.


This article from "Dan Dan Home" blog, reproduced please contact the author!

Get Android System Information

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.