October 2014
Intermediate to advanced
332 pages
6h 56m
English
The device plugin defines a global device object that describes the device's hardware and software. It is very important to note that the device object is available after the "deviceready" event occurs. In order to use the device plugin in our Apache Cordova project, we need to use the following cordova plugin add command:
> cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
In order to access the device demo, you can click on the Device list item. You will be introduced to the Device page. You can click on the Get Device Info button in order to get your device information, as shown in the following screenshot:
Getting device information
The following code snippet shows the "device" page: ...
Read now
Unlock full access