This plugin defines a global device object, which describes the device's hardware and software.
device.cordova:
device.model:
device.platform:
device.uuid:
device.version:
device.manufacturer:
device.isVirtual:
device.serial:
This demo is using the cordova-plugin-device plugin. For more information click here:
var GSW = GSW || {};
GSW.Tests = GSW.Tests || {};
GSW.Tests.onDeviceReady = function() {
// Cordova is now initialized. Have fun!
console.log('Now running cordova-' + cordova.platformId + '@' + cordova.version);
GSW.Tests.displayVariables = function() {
document.getElementById("cordova").innerHTML = device.cordova;
document.getElementById("model").innerHTML = device.model;
document.getElementById("platform").innerHTML = device.platform;
document.getElementById("uuid").innerHTML = device.uuid;
document.getElementById("version").innerHTML = device.version;
document.getElementById("manufacturer").innerHTML = device.manufacturer;
document.getElementById("isVirtual").innerHTML = device.isVirtual;
document.getElementById("serial").innerHTML = device.serial;
}
document.getElementById("display").addEventListener("click", GSW.Tests.displayVariables);
}
document.addEventListener('deviceready', GSW.Tests.onDeviceReady, false);