3

I have used java reflection but it does not give methods for all types of device like HUAWEI Y635-L21. Basically I need to get the IMEI of devices below API level 23. Is there any way to find multiple IMEI numbers on a device, which will work for all types of devices?

Henrique de Sousa
  • 5,727
  • 49
  • 55
Shadman Sakib
  • 219
  • 2
  • 10

2 Answers2

1

It's true that using "Reflection" is not 100% accurate. But why?

Android does not support multiple SIMs, at least from the SDK. Device manufacturers who have created multi-SIM devices are doing so on their own. You are welcome to contact your device manufacturer and see if they have an SDK add-on or something that allows you to access the second SIM.

-Commonsware

Daksh Gargas
  • 3,498
  • 2
  • 23
  • 37
0

getDeviceId() is the method from Telephony manager which provides unique IMEI for each device.

TelephonyManager telephonyManager = (TelephonyManager) 
getSystemService(Context.TELEPHONY_SERVICE);
String IMEI = telephonyManager.getDeviceId();
Anand
  • 51
  • 6