开发者

getDeviceId() API always returns null value on android emulators

开发者 https://www.devze.com 2023-01-30 15:41 出处:网络
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.

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

精彩评论

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