8. Device

The Cordova Device object allows an application to access a limited amount of information about the application and device running a Cordova application. As much as Cordova development is supposed to simplify cross-platform development and third-party HTML5 frameworks are supposed to make that easy, there are still times when an application needs to understand something about the device it’s running on. An application would use this API when enabling or disabling application features or capabilities that are only supported on particular Cordova versions, device model, device platform, device operating system versions and so on.

Using the Device API

To use the API in your Cordova applications, open a terminal window, navigate to the ...

Get Apache Cordova API Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.