Paldom / UniqueDeviceID

PhoneGap / Cordova unique device id (UUID) plugin for Android, iOS and Windows Phone 8. Remains the same after app uninstall.
MIT License
169 stars 96 forks source link

UUID is changing after application update for Android and IOS #28

Open razam217 opened 7 years ago

razam217 commented 7 years ago

I'm getting many logs from our customers, where the UUID is changing for every customer who has updated the application to newer version.

This is happening mostly with Android 6.0+ and IOS 10.0+.

I'm currently using 1.3.2 version of this plugin.

razam217 commented 7 years ago

I'm not very sure about that, whether it changes after application update or OS version update. But it happens, and we're seeing many customers with this issue. Any help would be appreciated.

regnete commented 7 years ago

Android ID is currently build by combination of three components:

Is there any reason why the latter two are used? If only Secure.ANDROID_ID (https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID) would be used, the results should be unique and stable I guess.

Another idea: Just use https://developer.android.com/reference/android/os/Build.html#SERIAL. Even the official ordova device plugin propagates this property (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/#deviceserial).

Only if neither Secure.ANDROID_ID nor Build.SERIAL are available, other source values should be used to build the id.

razam217 commented 7 years ago

Hi @regnete , Thanks for your reply. One more thing that I noticed is, all the customers facing this issue either they have Nexus or Pixel with latest version of Android version e.g. 7.0+.

Can you please tell me how is IOS UUID is generated?

regnete commented 7 years ago

I'm not a comiter for this project. I just made some suggestions to improve the plugin.

The iOS UUID is generated in a far different way. I gues they generate random UUID on first access and store it in the iOS keychain which is device specific.

razam217 commented 7 years ago

Okay @regnete , Thanks. It also seems like the ios UUID is app specific. Because I've multiple apps, and for each app, it returns different UUID.

regnete commented 7 years ago

If i remmeber correctly this is required by the itunes app store rules. you are not allowed to track the physical device.

razam217 commented 6 years ago

@rooz121359 Unfortunately, NO. :(

angel1st commented 6 years ago

@razam217 - 9 months latter - any development - did you find a better substitute on this plugin? Or perhaps a workaround?

razam217 commented 5 years ago

@angel1st Sorry for late reply. Now Android and IOS ID is not changing. In IOS it only changes after device reset.

In Android it changes if:

sagrawal31 commented 5 years ago

We are now maintaining a fork of this repository https://github.com/wizpanda/cordova-plugin-unique-device-id2.