MAP524/DPS924 Lecture 11

From CDOT Wiki
Revision as of 23:16, 10 August 2015 by Andrew (talk | contribs) (Created page with '= Cordova = Cordova (used to be and sometimes still is called Phonegap) is a way to write your app using HTML/CSS/JavaScript instead of Java/XML. Theoretically this also makes y…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Cordova

Cordova (used to be and sometimes still is called Phonegap) is a way to write your app using HTML/CSS/JavaScript instead of Java/XML. Theoretically this also makes your application platform-independent, you can build it for any version of Android, iOS, Blackberry, etc.

It relies on the idea that most everything you want to do in an application is available in the modern HTML5 standards, but clearly some things are not - for example access to the camera. For things like that Cordova offers plugins: chunks of native code that give you a JavaScript interface to the device features not normally available from a browser.

Setup

The Cordova development tools are easiest to install using npm, that's a package manager that comes with Node.js. You'll first have to install node.js:

su - # or sudo su -
apt-get install npm nodejs nodejs-legacy # nodejs-legacy is just a symlink from "nodejs" to "node"

You also need git but you should already have that installed (presumably you used it for the assignment). Now you can install Cordova (also as root):

npm install -g cordova