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

Is there a way to get different unique device IDs in two separate applications? #24

Closed Sobiru closed 7 years ago

Sobiru commented 8 years ago

Let's say I have two applications on a device and both of them are using this plugin. As of now, when I call window.plugins.uniqueDeviceID.get(), both of them return the same ID. My issue is that I don't want to duplicate my existing user tables for the second app so both apps are using the same tables and this is a problem as users in the first app are already recognized by that ID. Is there a way for each application to get their own unique device IDs?

Ziao commented 8 years ago

Why can't you just do window.plugins.uniqueDeviceID.get() + "app1" and window.plugins.uniqueDeviceID.get() + "app2"?

kashban commented 7 years ago

Use getVendorId(). This is uniqe on a per app basis.