本文介绍了UDID还是IMEI-更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 当开发需要我唯一识别电话用户的应用程序时。我希望一些建议,是否最好使用手机的UDID或IMEI。使用任何优点/缺点。非常感谢所有评论。解决方案 ANDROID_ID的优点: Settings.Secure.ANDROID_ID。这是设备首次启动时生成和存储的64位数( ANDROID_ID 对于Android 2.2和4.2不是唯一的) 缺少ANDROID_ID: ANDROID_ID 可以 null 几个制造商的几个设备受到2.2中的 ANDROID_ID 错误的影响,并且它们都具有相同的 ANDROID_ID ,即 9774d56d682e549c 。这也是模拟器报告的同一设备ID 文档: http://android-developers.blogspot.in/2011/03/identifying-app-installations.html ANDROID_ID 不再唯一标识设备: http://stackoverflow.com/a/13465373/150016 IMEI IMEI 数字始终是唯一的。 缺少IMEI 许多设备没有IMEI号码,即三星Galaxy Tab 2 重要链接 Android设备ID混淆 http://android-developers.blogspot.in/2011/03/ identify-app-installations.html 是否有唯一的Android设备ID? When developing an app that requires me to uniquely identify phone users. I was hoping for some advice on whether it is best to use a phone's UDID or IMEI. Are there any advantages/disadvantages to using either. All comments would be greatly appreciated 解决方案 Pros of ANDROID_ID:Settings.Secure.ANDROID_ID. This is a 64-bit quantity that is generated and stored when the device first boots (ANDROID_ID is not unique for android 2.2 and from 4.2)Cons of ANDROID_ID:ANDROID_ID can change on factory reset.ANDROID_ID can be nullIt can be easily changed on a rooted phoneSeveral devices by several manufacturers are affected by the ANDROID_ID bug in 2.2 and all of them have the same ANDROID_ID, which is 9774d56d682e549c. Which is also the same device id reported by the emulatorDocs: http://android-developers.blogspot.in/2011/03/identifying-app-installations.htmlANDROID_ID no longer uniquely identifies a device: http://stackoverflow.com/a/13465373/150016Pros of IMEI IMEI number is always unique. Cons of IMEIMany device don't have IMEI number i.e Samsung galaxy tab 2Important Linksandroid device id confusionhttp://android-developers.blogspot.in/2011/03/identifying-app-installations.htmlIs there a unique Android device ID? 这篇关于UDID还是IMEI-更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-16 15:55