问题
I depends on device.uuid to control my users, Does UUID change when factory reset, in Phonegap android.
回答1:
device.uuid
on android it gets the native android.provider.Settings.Secure.ANDROID_ID
According to the docs
A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device.
Note: When a device has multiple users (available on certain devices running Android 4.2 or higher), each user appears as a completely separate device, so the ANDROID_ID value is unique to each user.
So yes, if the user do a factory reset the value may change.
回答2:
If you are talking about device UUID for android , its a random ID generated on first boot of the device. It will stay the same until OS upgrade or Factory Reset. So you can use that id as an unique identifier for the device from your app. This way users don't even need to sign in to your app. Just by opening itself you get a unique (almost) identifier, that you could use.
UPDATE
According to the docs:
A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device.
UPDATE 2
Useful articles from android developers Identifying App Installations and Best Practices for Unique Identifiers.
来源:https://stackoverflow.com/questions/35579934/does-uuid-change-when-factory-reset-in-phonegap-android