Android Get phone Info tool class

Source: Internet
Author: User
<span id="Label3"></p><pre name="code" class="java"><pre name="code" class="java">Package Com.yqy.yqy_listviewheadview;import Android.content.context;import android.telephony.TelephonyManager; Import android.util.log;/** * Get phone Info Tool Class <br> * Internal has encapsulated the printing function, only need to change the debug parameter to True <br> * If you need to change the tag can be changed directly, The default is 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:" + 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;}}</pre></pre><br><p><p> Android Get phone info tool class </p> </p></span>

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.