Hello readers,
This post is about to get Unique Device Id in cordova application. Here is a plugin which provides UUID and does not change when we uninstall the app. Basically, we get new UUID whenever we re-install the app but with this plugin UUID does not change.
Supported platforms :
First install following plugin through CLI:
$cordova plugin add cordova-plugin-uniquedeviceid
After installation we can simply call a method to find device UUID.
window.plugins.uniqueDeviceID.get(onSuccess, onFail);
function onSuccess(uuid)
{
console.log("my device unique Id :"+ uuid);
}
function onError(error)
{
console.log("error :"+ error);
}
Hope this will help you.... Have a nice day... :)
1 Comment(s)