Android Get phone Info tool class

Source: Internet
Author: User

Package Com.yqy.yqy_listviewheadview;import Android.content.context;import Android.telephony.TelephonyManager; Import android.util.log;/** * Get phone info tool <br> * The print function is already encapsulated inside, only need to change the debug parameter to True to <br> * Assuming the need to change the tag can be changed directly, Kezhuang *  * * @author YQY *  */public class Deviceutils {/** * Get the IMEI number of the application */public static String Getimei (Contex T context) {if (context = = null) {LOG.E ("YQY", "Getimei  context is empty");} Telephonymanager Telecommanager = (telephonymanager) context.getsystemservice (Context.telephony_service); String IMEI = Telecommanager.getdeviceid (); LOG.E ("YQY", "IMEI ID:" + IMEI); return IMEI; /** * Gets the system version number of the device */public static int getdevicesdk () {int SDK = Android.os.Build.VERSION.SDK_INT; LOG.E ("YQY", "Device Version number:" + SDK); return SDK;} /** * Gets the model of the device */public static string Getdevicename () {string model = Android.os.Build.MODEL; LOG.E ("YQY", "Device Model:" + model); return model;}}

Android Get phone Info tool class

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.