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

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,180
  • 1
  • 25
  • 35
-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,313
  • 8
  • 33
  • 51
Stefan
  • 145
  • 1
  • 1
  • 8