Developing on Windows 7 with Cordova 3.0. All paths set up (even Git).
Using GitBash I created a new project, added Android as a platform, and added several plugins (Camera, Media, etc.). All are correctly displayed when I typed:
[ 'org.apache.cordova.core.AudioHandler',
'org.apache.cordova.core.camera',
'org.apache.cordova.core.file',
'org.apache.cordova.core.file-transfer',
'org.apache.cordova.core.media-capture' ]
In my "index.js" file I've changed the event listeners to:
onDeviceReady: function() {
// BackboneJS app
console.log("Device ready, creating backBone app...");
var photolan = new mediaList();
}
... with mediaList() being a BackBone JS view. I can see the console.logs in Eclipse when the app is launched so know there's nothing wrong with the Backbone code.
However, the function that calls the camera intent:
takePhoto: function() {
console.log("Taking photo");
navigator.camera.getPicture(this.onImageSuccess, this.onImageFail, { quality: 75,
destinationType: Camera.DestinationType.FILE_URI });
},
... gives this error (I can see the "taking photo" console text):
Uncaught ReferenceError: Camera is not defined at file:///android_asset/www/js/photolan/view_app.js:23
I've looked in the AndroidManifest and config.xml files and both have the appropriate includes and references to the camera -- so I'm a bit stumpped at this. Thoughts?