WRITE CODE SNIPPET TO RETRIEVE IMEI NUMBER OF ANDROID PHONE.

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
 841  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    Write code snippet to retrieve IMEI number of Android phone.

    TelephonyManager class can be used to get the IMEI number. It provides access to information about the telephony services on the device.

    TelephonyManager mTelephonyMgr = (TelephonyManager)
            getSystemService(Context.TELEPHONY_SERVICE);
            String imei = mTelephonyMgr.getDeviceId();

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!