Android Get basic information about phone model, manufacturer, DeviceID

Source: Internet
Author: User

/*** System Tool Class*/ Public classSystemutil {/*** Get the current phone system language. *     * @returnreturns the current system language. For example: "Chinese-Chinese" is currently set, then return "ZH-CN"*/     Public StaticString getsystemlanguage () {returnLocale.getdefault (). GetLanguage (); }    /*** Get a list of languages on the current system (locale list) *@returnLanguage list*/     Public Staticlocale[] Getsystemlanguagelist () {returnLocale.getavailablelocales (); }    /*** Get the current phone system version number * *@returnSystem version Number*/     Public StaticString getsystemversion () {returnAndroid.os.Build.VERSION.RELEASE; }    /*** Get Phone model * *@returnPhone Model*/     Public StaticString Getsystemmodel () {returnAndroid.os.Build.MODEL; }    /*** Get phone maker * *@returnMobile phone Manufacturers*/     Public StaticString Getdevicebrand () {returnAndroid.os.Build.BRAND; }    /*** Get IMEI for phone (requires "Android.permission.READ_PHONE_STATE" permission) * *@returnphone IMEI*/     Public StaticString Getimei (Context ctx) {Telephonymanager TM=(Telephonymanager) Ctx.getsystemservice (Activity.telephony_service); if(tm! =NULL) {            returnTm.getdeviceid (); }        return NULL; }}

Android Get basic information about phone model, manufacturer, DeviceID

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.