开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜