getDeviceId() API always returns null value on android emulators
why does it return null va开发者_如何学运维lue? is there a way for assigning a device's id to each an emulator.
It is performing as expected, as the emulator does not have an IMEI number.
http://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId()
If you test for null
, you can return your own fake device id for testing purposes.
精彩评论