How to get Hardware Unique Id of Android Phone even if Factory reset or Os update in device. I want to get Unique id which can not change in future on any event like Factory reset or Os update.
Asked
Active
Viewed 310 times
-2
-
All You Need Is To Research Before Asking! – Mosius Jul 14 '18 at 11:30
-
Take a look at: https://developer.android.com/training/articles/user-data-ids – Mosius Jul 14 '18 at 11:31
-
I Have already research a lot brother but didn't get proper solution. – Bhavik Makvana Jul 14 '18 at 11:36
-
Possible duplicate of [Is there a unique Android device ID?](https://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id) – vkrott Jul 21 '18 at 07:21
-
Have you considered the privacy implications from the user's perspective? How will you let them know they are being tracked in this fashion? Will you have a privacy policy? – halfer Aug 16 '18 at 10:39
2 Answers
1
I think this should be helpful:
@SuppressLint("HardwareIds")
String android_id = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);

Benjamin
- 7,055
- 6
- 40
- 60

Devinder Jhinjer
- 645
- 7
- 13
-2
you need to use wifi mac address or buetooth address of device.... they will not changed after factory reset....

Siddhesh Golatkar
- 295
- 1
- 6
-
-
If you mention hardware identifiers as a method of tracking users, you really should mention the privacy implications. Users often do not like to be tracked in this way, and at the very least their permission should be sought. – halfer Aug 16 '18 at 10:38