Drafts defines a single global
device object which provides access to information about the current device.
// get system info from device object var model = device.model; var system = device.systemName; var osVersion = device.systemVersion; var batteryLevel = device.batteryLevel; // create and display it in an alert var s = "Model: " + model + "\n"; s = s + "System: " + system + "\n"; s = s + "OS: " + osVersion + "\n"; s = s + "Battery: " + batteryLevel; alert(s);
Current battery level as a number between 0.0 and 1.0
Model of current device.
Name of current OS.
Version of current OS.
Generated using TypeDoc