Skip to main content
Version: 7.0.1

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("Device.Hardware.IMEI: " + Hardware.android.IMEI);
console.log("Device.Hardware.UID: " + Hardware.UID);
console.log("Device.Hardware.brandName: " + Hardware.brandName);
console.log("Device.Hardware.brandModel: " + Hardware.brandModel);
console.log("Device.Hardware.vendorID: " + Hardware.android.vendorID);
}
}