Skip to main content
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Is there a unique Android device ID?

Do Android devices have a unique ID, and if so, what is a simple way to access it using Java?

Answer*

Cancel
9
  • 10
    Interesting solution. It sounds like this is a situation where you really should be just hashing all that data concatenated instead of trying to come up with your own "hash" function. There are many instances where you'd get collisions even if there is substantial data that is different for each value. My recommendation: use a hash function and then transform the binary results into decimal and truncate it as needed. To do it right, though you should really use a UUID or full hash string.
    Steve Pomeroy
    –  Steve Pomeroy
    2011-04-12 16:28:04 +00:00
    Commented Apr 12, 2011 at 16:28
  • 25
    You should give credit to your sources... This has been lifted straight out of the following article: pocketmagic.net/?p=1662
    Steve Haley
    –  Steve Haley
    2011-05-16 12:07:44 +00:00
    Commented May 16, 2011 at 12:07
  • 11
    This ID is open to collisions like you don't know what. It's practically guaranteed to be the same on identical devices from the same carrier.
    Seva Alekseyev
    –  Seva Alekseyev
    2011-05-26 20:21:30 +00:00
    Commented May 26, 2011 at 20:21
  • 10
    This may also change if the device gets upgraded.
    David Given
    –  David Given
    2012-01-25 12:25:54 +00:00
    Commented Jan 25, 2012 at 12:25
  • 13
    Very, very bad solution. Tested on two Nexus 5... Return same numbers.
    Sinan Dizdarević
    –  Sinan Dizdarević
    2015-03-04 16:53:23 +00:00
    Commented Mar 4, 2015 at 16:53

Morty Proxy This is a proxified and sanitized view of the page, visit original site.