BestBurning / platform_device_id

flutter plugin to get device id
https://pub.dev/packages?q=platform_device_id
BSD 3-Clause "New" or "Revised" License
81 stars 203 forks source link

PlatformDeviceId.getDeviceId changes with the app release #39

Open ilmanowar opened 1 year ago

ilmanowar commented 1 year ago

Hello, I supposed that PlatformDeviceId is a static ID connected to the device only. But strangely, I saw it changing after I installed an upgraded version of my apk app. I was looking for an ID that depends on the hardware only, not randomly created. So far, I did try several device id libraries, and all give a pseudo-random ID which changes with a new application. Therefore, I would ask, is this working as intended? Thanks.

memoriasIT commented 1 year ago

Please note that on Android 8 and above, the Android ID is not unique per device, but also per signing key the app was built with:

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. The value may change if a factory reset is performed on the device or if an APK signing key changes.