UDID or IMEI- which is better?
Asked Answered
T

2

7

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

Tavis answered 10/6, 2013 at 13:6 Comment(1)
May this helps : #16646282Dragoon
C
9

Pros of ANDROID_ID:

  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)

Cons of ANDROID_ID:

  1. ANDROID_ID can change on factory reset.

  2. ANDROID_ID can be null

  3. It can be easily changed on a rooted phone

  4. 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

    Docs: http://android-developers.blogspot.in/2011/03/identifying-app-installations.html

  5. ANDROID_ID no longer uniquely identifies a device: https://mcmap.net/q/11178/-implications-of-android-multiple-user-support-new-in-4-2-for-server-side-data-model-e-g-android_id

Pros of IMEI

  1. IMEI number is always unique.

Cons of IMEI

  1. Many device don't have IMEI number i.e Samsung galaxy tab 2

Important Links

Comeuppance answered 10/6, 2013 at 13:17 Comment(0)
G
0

If you want to identify a device you should try UUID

http://developer.android.com/reference/java/util/UUID.html

or maybe try your own identifier. I used a MD5 over the IDs and the MAC-Address, combined with the devices System-Nano-Time. It realy would be a big coincident if two devices have the same "unique ID".

Glassy answered 10/6, 2013 at 17:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.