Skip to main content
Version: 7.2.0

Hardware

API Reference: Device.Hardware

Hardware is used to retrieve certain device hardware information.

TypeScript
import PageSampleDesign from "generated/pages/pageSample";
import { Route, Router } from "@smartface/router";
import Application from "@smartface/native/application";
import Hardware from "@smartface/native/device/hardware";

//You should create new Page from UI-Editor and extend with it.
export default class Sample extends PageSampleDesign {
constructor(private router?: Router, private route?: Route) {
super({});
}

onShow() {
super.onShow();
const { headerBar } = this;
Application.statusBar.visible = false;
headerBar.visible = false;

}

onLoad() {
super.onLoad();
console.log("Hardware.UID: " + Hardware.UID);
console.log("Hardware.brandName: " + Hardware.brandName);
console.log("Hardware.brandModel: " + Hardware.brandModel);
console.log("Hardware.deviceType: " + Hardware.deviceType);
console.log("Hardware.manufacturer: " + Hardware.manufacturer);
console.log("Hardware.modelName: " + Hardware.modelName);

}
}