@awesome-cordova-library/device
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.
Cordova documentation
Installation
cordova plugin add cordova-plugin-device
npm i cordova-plugin-device
Vanilla
Import
import Device from "@awesome-cordova-library/device";
class Device {
static getModel(): string;
static getPlatform(): string;
static getVersion(): string;
static getUuid(): string | null;
static getManufacturer(): string | null;
static getIsVirtual(): boolean;
}
React
Import
import useDevice from "@awesome-cordova-library/device/lib/react";
const useDevice: () => {
getModel: () => string;
getPlatform: () => string;
getUuid: () => string | null;
getVersion: () => string | null;
getManufacturer: () => string | null;
};