This plugin defines a global device
object, which describes the device's hardware and software.
Although the object is in the global scope, it is not available until after the deviceready
event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log(device.cordova);
}
cordova plugin add cordova-plugin-schedule
- device.cordova
- device.uuid
Get the version of Cordova running on the device.
- Android
Get the device's Universally Unique Identifier (UUID).
var string = device.uuid;
The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
- Android
// Android: Returns a random 64-bit integer (as a string, again!)
var deviceID = device.uuid;