0

Hi I'm developing an android application an runed it on genymotion emulator , in this application i need the device IMEI but i always get a null value the same logic works with AVD emulator or android smartphone

TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
IMEI = telephonyManager.getDeviceId();

with permission added to the manifest

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
Taoufik RIFAI
  • 50
  • 2
  • 7
  • What do you mean by same logic works with AVD emulator? Are you able to get IMEI number from AVD? – Mohit Aug 23 '13 at 18:01

2 Answers2

0

The .getdeviceID()

is not reliable and yes it returns null if its an emulator. i found a link that might help you. Like an alternative

Link 1

Link 2

Link 3

Community
  • 1
  • 1
ImGeorge
  • 527
  • 6
  • 24
0

Genymotion emulator doesn't have IMEI code as there was an IMEI code if it's a real phone. But you can still generate a fake code with some specific method.

Jiancong
  • 67
  • 1
  • 7