Device Plugin
Last updated
Was this helpful?
Last updated
Was this helpful?
Tested Version:
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.
In order to use this plugin, please Device
plugin in Monaca Cloud IDE.
device.cordova
device.model
device.platform
device.uuid
device.version
device.manufacturer
device.isVirtual
device.serial
Get the version of Cordova running on the device.
Android
iOS
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.
Android
iOS
Get the device's operating system name.
Android
iOS
The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
Android
iOS
Get the operating system version.
Android 2.1+
iOS
Get the device's manufacturer.
Android
iOS
whether the device is running on a simulator.
Android 2.1+
iOS
Android
See Also:
Gets the instead of the , which is often the production code name. For example, the Nexus One returns Passion
, and Motorola Droid returns voles
.
Get the device's Universally Unique Identifier ().
The uuid
on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled. Refer for details. The UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences.
Get the device hardware serial number ().