2

I wonder maybe there are some ways to get some hardware info, and then make an unique id for this phone based on these info.

Is that possible?

Luis404
  • 87
  • 7
  • Please go through http://android-developers.blogspot.in/2011/03/identifying-app-installations.html or http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id – Sunny Nov 26 '15 at 08:37
  • I see these posts, but these ids change when reset and install an different ROM on your phone. – Luis404 Nov 26 '15 at 08:37
  • You could try to get the IMEI, but it can be changed too! – Nanoc Nov 26 '15 at 09:08
  • so are there any unchangeable infos? – Luis404 Nov 26 '15 at 09:23

2 Answers2

0

You can use device IMEI number. Most of case it's unique.

check this post -> How to get the device's IMEI/ESN programmatically in android?

Community
  • 1
  • 1
Zahidul Islam
  • 3,130
  • 1
  • 23
  • 34
-1

As you read there isn't a 100% safe method to get a unique id. Another approach that you can use (if you want a unique identifier for your app) is to generate a random UUID at your first install and save it locally;

UUID uuid = UUID.randomUUID();
preferences.setAppId(uuid.toString());
Abhinav Singh Maurya
  • 3,303
  • 8
  • 32
  • 50
Stefan
  • 125
  • 1
  • 1
  • 7