Ubuntu Platform Guide
Welcome to the initial release of Ubuntu platform support in Cordova. With this release, the focus is developing on an Ubuntu system and using the Cordova Web Project Dev Workflow. This includes adding the Ubuntu platform to your project, adding standard Cordova plugins, and, of course, building and running apps for the Ubuntu platform.
You may also want to install the Ubuntu QtCreator development environment. See developer.ubuntu.com for more info. (The QtCreator SDK is not required to add Ubuntu platform support to your Cordova app.)
Ubuntu Runtime Platforms
Ubuntu is well-known for its Desktop environment (for laptops, PCs and such). Ubuntu Touch extends the Ubuntu OS onto phones and tablets. Ubuntu runtime platforms have varying CPU architectures (x86, armhf, etc.). App and plugin code must be compiled appropriately. Support for this broad area is rapidly evolving in the Ubuntu.
For the latest information on Cordova app support for Ubuntu runtime platforms, see wiki.ubuntu.com/Cordova.
Development Platform Requirements
For this initial release, the development platform should be an Ubuntu Desktop. Ubuntu 13.10 (codename ‘saucy’) or later is required to enjoy the full set of supported capabilities.
You can install Cordova on non-Ubuntu systems (using npm), but important capabilities are only provided through Ubuntu debian packages at this time.
Add the Ubuntu Cordova Personal Package Archive to your Ubuntu system:
$ sudo add-apt-repository ppa:cordova-ubuntu/ppa $ sudo apt-get update
Install cordova-cli package (and its dependencies):
$ sudo apt-get install cordova-cli
Create a project
$ cordova create project1 REVERSEDNSNAME.project1 project1
Move into the Project Directory
$ cd project1
Add the Ubuntu Platform
$ cordova platform add ubuntu
Build for Ubuntu
$ cordova build ubuntu
Run the App
$ cordova run ubuntu
Add the Battery Status Plugin
$ cordova plugin add org.apache.cordova.battery-status