Variable DeviceUtilsConst
DeviceUtils: {
addOnlineStatusListener(callback): (() => void);
getBatteryLevel(): Promise<null | number>;
getConnectionType(): null | string;
getDeviceType(): "mobile" | "tablet" | "desktop";
getHardwareConcurrency(): number;
getLanguage(): string;
getMemory(): null | number;
getOrientation(): "portrait" | "landscape";
getPixelRatio(): number;
getPlatform(): string;
getScreenDimensions(): {
width: number;
height: number;
};
getVendor(): string;
isMacAddress(mac): boolean;
isMobile(): boolean;
isOnline(): boolean;
supportsTouch(): boolean;
} = ...
Type declaration
addOnlineStatusListener:function
getBatteryLevel:function
getConnectionType:function
getDeviceType:function
- getDeviceType(): "mobile" | "tablet" | "desktop"
Returns "mobile" | "tablet" | "desktop"
Device type
getHardwareConcurrency:function
- getHardwareConcurrency(): number
Returns number
Number of CPU cores
getLanguage:function
- getLanguage(): string
Returns string
Device language
getMemory:function
getOrientation:function
- getOrientation(): "portrait" | "landscape"
Returns "portrait" | "landscape"
Device orientation
getPixelRatio:function
- getPixelRatio(): number
Returns number
Device pixel ratio
getPlatform:function
- getPlatform(): string
Returns string
Device platform
getScreenDimensions:function
getVendor:function
- getVendor(): string
Returns string
Device vendor
isMacAddress:function
isMobile:function
- isMobile(): boolean
Returns boolean
True if mobile device
isOnline:function
- isOnline(): boolean
Returns boolean
True if online
supportsTouch:function
Adds a listener for online/offline status changes