Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
razam217 opened this issue Mar 9, 2017 · 10 comments
Open

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

razam217 opened this issue Mar 9, 2017 · 10 comments

Comments

@razam217
Copy link

razam217 commented Mar 9, 2017

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
Copy link
Author

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
Copy link

regnete commented Mar 13, 2017

Android ID is currently build by combination of three components:

  • Secure.ANDROID_ID: according to the android docs, this is stable over the whole livetime of a device
  • TelephonyManager.getDeviceId(): should be stable
  • TelephonyManager.getSimSerialNumber): depends on the SIM urrently plugegd to the device --> unstable

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
Copy link
Author

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
Copy link

regnete commented Mar 13, 2017

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
Copy link
Author

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
Copy link

regnete commented Mar 13, 2017

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

@razam217
Copy link
Author

razam217 commented Jan 5, 2018

@rooz121359 Unfortunately, NO. :(

@angel1st
Copy link

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

@razam217
Copy link
Author

@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:

  • DeviceID is changed (which will be changed if apk signing certificate is changed, device is reset or different Android User Account is used)
  • Sim is changed

@sagrawal31
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@sagrawal31 @regnete @angel1st @razam217 and others