Get unique mobile ID (device Id) from mobile in cordova.
// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
var element = document.getElementById('deviceProperties');
element.innerHTML = 'Device Name: ' + device.name + '<br />' +
'Device Cordova: ' + device.cordova + '<br />' +
'Device Platform: ' + device.platform + '<br />' +
'Device UUID: ' + device.uuid + '<br />' +
'device model: ' + device.model + '<br />' +
'device manufacturer: ' + device.manufacturer + '<br />' +
'device isVirtual: ' + device.isVirtual + '<br />' +
'device serial: ' + device.serial + '<br />' +
'Device Version: ' + device.version + '<br />';
}
</script>
Comments
Post a Comment