A few questions about the behavior of unique ID of Android device?

That's the way I get unique device ID:
String android_id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);

1) If the user comes from the other device, but under the same account and the same app, you will be given a new unique number?
2) Change the unique ID if you call this code 2 times in a row (Yes, I can check myself, but maybe there are exceptions?)? If so, when?
3) If the user deletes the app and then a month later again to install it, the identifier will remain the same?

I'm probably missing a huge number of possible situations, this'd appreciate tips on any pitfalls using this method.
July 8th 19 at 15:22
2 answers
July 8th 19 at 15:24
1 Yes
2 No
3 Yes

Here's what it generated
July 8th 19 at 15:26
This method to use of pointless, because this field is not unique for the phone.
Manufacturers often release a line of phones single ANDROID_ID.
For example all "Motorola Droid2" ANDROID_ID = 9774d56d682e549c

It is written for Android developers

ANDROID_ID seems a good choice for a unique device identifier. There are downsides: First, it is not 100% reliable on releases of Android prior to 2.2 (“Froyo”). Also, there has been at least one widely-observed bug in a popular handset from a major manufacturer, where every instance has the same ANDROID_ID.
but if the minimum version is API 15 (this is something about 4+ version), then everything is fine? - maurice_Schumm1 commented on July 8th 19 at 15:29
Of course not :)
Because the problem is not the version of the API, and the producers ( S. P. in "Motorola Droid2" version of android 2.3).
Also do not forget about the Chinese phones - they have often found ANDROID_ID = null - nayeli_OConner39 commented on July 8th 19 at 15:32
: by submitting this comment I assumed that before Google even had no idea so abnormal manufacturers. May version Google puts certain matching criteria, this and asked. He can not be put, by the fact that this ****. - maurice_Schumm1 commented on July 8th 19 at 15:35

Find more questions by tags Android