Device
Access information about the underlying device and platform.
Repo: https://github.com/apache/cordova-plugin-device
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-device $ npm install --save @ionic-native/device@4
- Add this plugin to your app's module
Supported platforms
- Android
- Browser
- iOS
- macOS
- Windows
Usage
import { Device } from '@ionic-native/device';
constructor(private device: Device) { }
...
console.log('Device UUID is: ' + this.device.uuid);
Instance Members
cordova
Get the version of Cordova running on the device.
model
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
Get the device’s operating system name.
uuid
Get the device’s Universally Unique Identifier (UUID).
version
Get the operating system version.
manufacturer
Get the device’s manufacturer.
isVirtual
Whether the device is running on a simulator.
serial
Get the device hardware serial number.