Android to get information on mobile devices, etc.

Source: Internet
Author: User

Get information on your phone's device model:

Huawei P6 Mobile phone access is the value of mobile device information:


The code is as follows:

                Tvstr = (TextView) Findviewbyid (R.id.tv_titlebar); String phoneinfo = "Product:" + Android.os.Build.PRODUCT + "\ n";p honeinfo + = "Cpu_abi:" + Android.os.Build.CPU_ABI + "\ n ";p Honeinfo + =" TAGS: "+ Android.os.Build.TAGS +" \ n ";p honeinfo + =" version_codes. BASE: "+ Android.os.Build.VERSION_CODES. BASE + "\ n";p honeinfo + = "MODEL:" + Android.os.Build.MODEL + "\ n";p honeinfo + = "SDK:" + Android.os.Build.VERSION.SDK + " \ n ";p honeinfo + =" VERSION. RELEASE: "+ android.os.build.version.release+" \ n ";p honeinfo + =" DEVICE: "+ Android.os.Build.DEVICE +" \ n ";p honeinfo + = "DISPLAY:" + Android.os.Build.DISPLAY + "\ n";p honeinfo + = "BRAND:" + Android.os.Build.BRAND + "\ n";p honeinfo + = "BOARD:  "+ Android.os.Build.BOARD +" \ n ";p honeinfo + =" Fingerprint: "+ Android.os.Build.FINGERPRINT +" \ n ";p honeinfo + =" ID: "+ Android.os.Build.ID + "\ n";p honeinfo + = "Manufacturer:" + Android.os.Build.MANUFACTURER + "\ n";p honeinfo + = "USER:" + A Ndroid.os.Build.USER + "\ n";//This method is not available in the service, DispLaymetrics dm = new Displaymetrics (); Getwindowmanager (). Getdefaultdisplay (). Getmetrics (DM); int width = Dm.widthpixels ; wide int height = dm.heightpixels; High///WindowManager Mwindowmanager = (windowmanager)//Getsystemservice (Context.window_service) can also be obtained in SERVICE; /width = Mwindowmanager.getdefaultdisplay (). getwidth ();//height = Mwindowmanager.getdefaultdisplay (). GetHeight (); Phoneinfo + = "width:" + width + "\ n";p honeinfo + = "Height:" + height;tvstr.settext (phoneinfo);



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android to get information on mobile devices, etc.

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.