DevicePlugin

getInfo

getInfo(): Promise<DeviceInfo>
Return information about the underlying device/os/platform
Returns: Promise<DeviceInfo>

getLanguageCode

getLanguageCode(): Promise<DeviceLanguageCodeResult>
Get the device's current language locale code
Returns: Promise<DeviceLanguageCodeResult>

addListener

addListener(eventName: string, listenerFunc: Function): PluginListenerHandle
eventName string
listenerFunc Function
Returns: PluginListenerHandle

Interfaces Used

DeviceInfo

interface DeviceInfo {
// The current bundle build of the app
appBuild : string;
// The current bundle verison of the app
appVersion : string;
// A percentage (0 to 1) indicating how much the battery is charged
batteryLevel ?: number;
// How much free disk space is available on the the normal data storage path for the os, in bytes
diskFree ?: number;
// The total size of the normal data storage path for the OS, in bytes
diskTotal ?: number;
// Whether the device is charging
isCharging ?: boolean;
// Whether the app is running in a simulator/emulator
isVirtual : boolean;
// The manufacturer of the device
manufacturer : string;
// Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used.
memUsed ?: number;
// The device model. For example, "iPhone"
model : string;
// The operating system of the device
operatingSystem : OperatingSystem;
// The version of the device OS
osVersion : string;
// The device platform (lowercase).
platform : any;
// The UUID of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install UUIDs.
uuid : string;
}

DeviceLanguageCodeResult

interface DeviceLanguageCodeResult {
value : string;
}

OperatingSystem

type alias OperatingSystem {
}