0

I used this line in Android Studio to get IMEI number,

"android.telephony.TelephonyManager.getDeviceId()"

and I can see the first IMEI, but I need see the second IMEI.

Update: I checked this link Android : Check whether the phone is dual SIM

but I cant resolve the second IMEI.

Community
  • 1
  • 1
Diego
  • 1
  • 1
  • 4

3 Answers3

0

Try using getDeviceId(int slotId) added in API level 23.

TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE‌​);
String imeiNumber1 = tm.getDeviceId(0);
String imeiNumber2 = tm.getDeviceId(1);

Requires Permission: READ_PHONE_STATE

rafeek
  • 103
  • 1
  • 4
  • 13
  • please refer https://stackoverflow.com/questions/22524413/programmatically-retrieve-imei-number-for-dual-sim-in-android – rafeek Nov 17 '17 at 05:42
0

IMEI number is depending on your sim slots if you have triple sim mobile there is 3 imei numbers so best way to find out is Check this link Vaibhav Jani naild it

Sushant Gosavi
  • 3,647
  • 3
  • 35
  • 55
-3

Just add 8 to the last three digits of your first imei number like:

example : 123456789012345 (first imei)
          123456789012353 (second imei)
Derek Brown
  • 4,232
  • 4
  • 27
  • 44