Cordova provides access to the hardware camera via the org.apache.cordova.camera
plugin.
Plugins are added to our application via the cordova plugin add
command.
To add the camera plugin, enter the following command in a terminal window at the root directory of our application:
cordova plugin add org.apache.cordova.camera
Once installed, the camera methods are made available via the navigator.camera
object.
Our example will use the Kendo UI mobile framework. To get set up, follow these steps:
Copy the Kendo UI
kendo
directory into thewww
directory of our Cordova application.Replace the contents of
index.html
with the following code:<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="format-detection" content="telephone=no" /> <meta name="msapplication-tap-highlight" content="no" /> <link rel="stylesheet" href="kendo/styles/kendo.mobile.all.min.css"> <title>CoffeeScript - Cordova</title...