We are replacing the identification of Android terminals by abandoning the IMEI and evaluating alternatives.
It is acceptable to us that the identifier changes after each reinstallation of the app. What we would need is a guarantee that two devices can never have the same identifier.
We found several possible approaches such as: ANDROID ID
String androidID = Android.Provider.Settings.Secure.GetString(cnt.ContentResolver, Android.Provider.Settings.Secure.AndroidId);
UUID
String uniqueID = UUID.randomUUID().toString();
What is the difference between these identifiers? In particular:
- With which of the two identifiers does one eliminate (or reduce) the risk/probability of obtaining the same identifier on multiple devices?
- What is the most persistent way to store the data in order to reduce the possibility that it needs to be regenerated?
Many thanks in advance
Your question contains more than one question.
Unfortunately, there is no sure way to do this.
The most practical way I can think of. You can define the recording date as day month year hour minute second millisecond.
This question was discussed many years ago and remains relevant.
UUID
128-bit
value used to uniquely identify an object or entity on the internetAndroidID
On Android
8.0 (API level 26)
and higher versions of the platform, a 64-bit number (expressed as a hexadecimal string), unique to each combination of app-signing key, user, and device.Android ID's
UUID
I recommend cloud and server services.