To find IMEI no of your Android Device, programatically




To test the  IMEI no of your Android device:

TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
        String deviceID =telephonyManager.getDeviceId();
Add below permission in the manifest file.

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

14 comments:

  1. For Dual sim how it is possible to get 2 IMEI's?

    ReplyDelete
  2. IMEI number is refers to the actual phone device not the SIM card. the SIM card is just the "subscriber id module" you can switch SIM carsd but the IMEI number i still the same, baecause the device is still the same.

    ReplyDelete
  3. How i can locate an android device using IMEI number programmatically ?

    ReplyDelete
    Replies
    1. Akash,

      You may have to use Android location manager APIs + A server which can store the location data sent by devices.
      1. Get device's current location.
      2. Fetch the IMEI of the device[As posted above].
      3. Establish connection with the server and post these data in corresponding format.

      Here is the starting point for Android location manager: http://developer.android.com/training/basics/location/locationmanager.html

      Delete
  4. Btw... there are devices having multiple IMEIs. And it does give a lot of problem for identifying the device.

    ReplyDelete
  5. How to returns the EUIMID from the SIM card

    ReplyDelete
  6. How to get dual sim IMEI number

    ReplyDelete
  7. How can i check whether dual sim or single???

    ReplyDelete
  8. from which version and above this id will work ?

    ReplyDelete
  9. Android 10 (API level 29) adds restrictions on identifiers that cannot be reset, including IMEI and serial numbers. Your application must be a device or profile owner, with special service provider permissions or READ_PRIVILEGED_PHONE_STATE permission to gain access to these identifiers.

    ReplyDelete
    Replies
    1. Yess....but any other way to identify device uniquely

      Delete
  10. I’m more than happy to discover this great site. I need to to thank you for ones time for this wonderful read!! I definitely enjoyed every part of it 온라인카지노
    (mm)

    ReplyDelete
  11. What i do not realize is in reality how you are not really much more neatly-preferred than you might be right
    now. You are very intelligent. You realize thus significantly when it comes to this matter, made
    me for my part believe it from numerous numerous angles.
    Its like women and men aren’t involved until it’s something to do with Woman gaga!
    Your own stuffs great. All the time maintain it up! 인터넷경마


    2JIYANGWOOK

    ReplyDelete