本文介绍了UDID或IMEI-哪个更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发需要我唯一识别手机用户的应用程序。我希望它是否最好使用手机的UDID或IMEI一些建议。是否有任何优点/缺点使用两种。所有评论将大大AP preciated

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

推荐答案

ANDROID_ID的优点:


  1. Settings.Secure.ANDROID_ID。这是生成并存储在设备第一次启动( ANDROID_ID 不是在Android 2.2及4.2是唯一的)
  2. 64位数量
  1. 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)

ANDROID_ID的缺点:


  1. ANDROID_ID 可以恢复出厂设置改变。

  1. ANDROID_ID can change on factory reset.

ANDROID_ID

它可以有根的手机上方便地改变

It can be easily changed on a rooted phone

由几家制造商有几个设备由 ANDROID_ID 错误2.2影响,他们都具有相同的 ANDROID_ID ,即 9774d56d682e549c 。这也是仿真器报告的设备ID相同

Several 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 emulator

文件:

ANDROID_ID 不再是唯一标识设备:http://stackoverflow.com/a/13465373/150016

ANDROID_ID no longer uniquely identifies a device: http://stackoverflow.com/a/13465373/150016

IMEI的赞成


  1. 总是独一无二的。

  1. IMEI number is always unique.

IMEI的缺点


  1. 很多设备没有IMEI号码即三星Galaxy Tab 2

重要链接





  • android device id confusion
  • http://android-developers.blogspot.in/2011/03/identifying-app-installations.html
  • Is there a unique Android device ID?

这篇关于UDID或IMEI-哪个更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 20:07