0

I'm looking for a constant identifier from an android device whether it's phone or tablet or some other. I checked and found 4 options IMEI, IMSI, Android_ID and MAC ID. The first 3 are found not reliable as they can be changed in one or other method.

So can we trust MAC ID of the device considering the device has any sort of network in it, whether it's bluetooth or wifi, can it be changed?

Also will 2 devices have same MAC ID ?

OR can i make a unique id from all the above. Please suggest me a method to get a unique identifier from an android device. I need to to recognize all the users of my app.

hablema
  • 540
  • 1
  • 5
  • 17
  • As per my knowledge if you want to recognize an android device unique you should use Android Device id which is unique. but you can also use mac address – Yahya Arshad Jul 27 '12 at 07:44

2 Answers2

0

In case of rooted device it is possible that two devices can have the same MAC. So it's not reliable to use them. There is an article which explains how you can identify your device. They advice to use [ANDROID_ID][2] to identify devices.

Moreover, you can combine somehow all those identifiers (for instance, concatenate them into a string and get a hash of it) into your own one if you want to increase the chance of distinguishing two different devices. To my point of view, you can use just ANDROID_ID.

Yury
  • 20,618
  • 7
  • 58
  • 86
0

It depends on what you are using your applications for. In my case, I develop a bluetooth app, all the data I get from the client will be saved as a file, with a format such as

[sendersMacAddress, Date, RandomGeneratedNumber]

Maybe this stackoverflow post will help you?

Community
  • 1
  • 1
Tobias Moe Thorstensen
  • 8,861
  • 16
  • 75
  • 143