noob_nerd
noob_nerd

Reputation: 551

Device Identifier in Android that does not change after device factory reset

Is there any device identifier in Android which can be read by apps and that does not change after factory reset of the device? Hardware identifiers are not advised to be used in Android documentation. I tried creating an identifier in the app and using it but the problem is that the identifier is lost once the app is uninstalled from the device. Is there a way to store the identifier such that it can be retrieved even after the app is uninstalled and re-installed?

There is an identifier called enrollmentSpecificId which can be used by device or profile owner app but my app is not an Enterprise Mobility Management (EMM) which probably means i cannot use an enrollmentSpecificId for my use-case.

Another option is to use the flag hasFragileUserData and save the data but this approach is completely dependent upon whether the user chooses to keep the data during uninstall. Hence, the problem cannot be solved by this approach.

EDIT 1: According to Android documentation, DRM API can be used for this use-case. Has anyone used Widevine ID for identifying devices uniquely?

Upvotes: 1

Views: 723

Answers (0)

Related Questions