Android UDID 和 iPhone 一样吗?
Android 也有像 iPhone 一样的 UDID 吗?如果是,有什么方法可以以编程方式获取它吗?
谢谢 克里斯
Does Android have a UDID like IPhone? If yes, is there a way I can get it programatically?
Thanks
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
来自 文档:
From the docs:
获取 Android UDID 非常简单 - 请查看以下代码:
要获取设备 ID,您必须在 AndroidManifest.xml 中设置以下权限:
要获取 Android ID,您不需要设置任何权限。
It's very easy to get the Android UDID - check out the following code:
For getting the Device ID you have to set following permission in AndroidManifest.xml:
For getting the Android ID you don't need to set any permission.
过去,设备 ID 仅在您启动时将手机与 Google 帐户关联起来注册 Market 后才可用,即在模拟器上不可用。这似乎在 Android 2.2 中发生了变化,其中也为模拟器生成了一个。我不认为它与 IMEI、ICC 或任何其他与手机相关的令牌相关,而是由 Google 网络服务生成的用于识别您的手机的伪唯一令牌。
The Device ID used to only be available if you had signed up for Market by associating your phone with your Google account when you start, i.e. not available on the emulator. This seems to have changed with Android 2.2, where one is generated for the emulator as well. I don't believe it is associated with IMEI, ICC or any other phone-related token, but is rather a pseudo-unique token generated by Google web services to identify your phone.
我实现了一个类来获取IMEI / Wifi MAC地址/设备ID,希望它对你有用^^
I implemented a class to get IMEI / Wifi MAC address / deviceID, hope it useful for you ^^