Device
EOL Notice
Device will reach its end-of-life on July 1, 2024, and will no longer receive updates or support. Please see Support Policy for additional information.
The Device plugin provides access to information about the underlying device and platform that the app is running on.
Installation
If you have not already setup Ionic Enterprise in your app, follow the one-time setup steps.
Next, install the plugin:
- Capacitor
- Cordova
npm install @ionic-enterprise/device
npx cap sync
ionic cordova plugin add @ionic-enterprise/device
Index
Classes
Classes
Device
usage:
import { Device } from '@ionic-enterprise/device/ngx';
constructor(private device: Device) { }
...
console.log('Device UUID is: ' + this.device.uuid);
cordova
● cordova: string
Get the version of Cordova running on the device.
isVirtual
● isVirtual: boolean
Whether the device is running on a simulator.
manufacturer
● manufacturer: string
Get the device's manufacturer.
model
● model: string
The device.model returns the name of the device's model or product. The value is set by the device manufacturer and may be different across versions of the same product.
platform
● platform: string
Get the device's operating system name.
serial
● serial: string
Get the device hardware serial number.
uuid
● uuid: string
Get the device's Universally Unique Identifier (UUID).
version
● version: string
Get the operating system version.