System

API Reference: Device.System

System is used to retrieve operating system-specific information of the device.

JavaScript
JavaScript
const Page = require("sf-core/ui/page");
const extend = require("js-base/core/extend");
const System = require('sf-core/device/system');
var Page1 = extend(Page)(
function(_super) {
_super(this, {
onShow: function(params) {
Application.statusBar.visible = false;
this.headerBar.visible = false;
}
});
console.log("Device.System.OS: " + System.OS);
console.log("Device.System.OSVersion: " + System.OSVersion);
console.log("Device.System.android.apiLevel: " + System.android.apiLevel);
console.log("Device.System.batteryLevel: " + System.batteryLevel);
console.log("Device.System.isBatteryCharged: " + System.isBatteryCharged);
console.log("Device.System.language: " + System.language);
console.log("Device.System.android.isApplicationInstalled: " + System.android.isApplicationInstalled('io.smartface.SmartfaceApp'));
console.log("Device.System.vibrate(): " + System.vibrate());
console.log("Device.System.android.menuKeyAvaliable: " + System.android.menuKeyAvaliable);
console.log("Device.System.fingerPrintAvailable: " + System.fingerPrintAvailable);
}
);
module.exports = Page1;