Device hash
About the device hash
The device hash is a SHA256 hash of a universally unique identifier (UUID) derived from the Settings.Secure.ANDROID_ID value in the Android SDK.
- In Android 8.0 and above, the
ANDROID_IDis a unique value to each device, user and signing key. - In versions prior to Android 8.0, the
ANDROID_IDis generated during device setup and is constant for the lifetime of the device. - If an end-user updates their system from a version prior to Android 8.0 to a version of Android 8.0 or above, then the
ANDROID_IDcould change for an app if the app is uninstalled and installed again.Want to learn more?You can find more information about this in the Android developer documentation.
When is the device hash deleted?
The device ID (deviceId) may change if a factory reset is performed on the device.
Device hash details
- The
deviceHash= SHA256(UUID.nameUUIDFromBytes(deviceId.getBytes()).toString())) - The
deviceId=Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID)