I am using PhoneGap 2.9.0 with a camera API for my iPhone application. When I call a method, it does not work. Here is my code:
Application / Support Files / Cordova.plist
<key>Plugins</key> <dict> <key>Camera</key> <string>CDVCamera</string> </dict>
config.xml
<plugin name="Camera" value="CDVCamera" />
Capture method
function capturePhoto() { navigator.camera.getPicture(onPhotoURISuccess, fail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI }); } function onPhotoURISuccess(imageURI) { Ext.Viewport.setMasked({ xtype: 'loadmask', message: 'Loading..', indicator: true }); var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1); options.mimeType = "image/jpeg"; var params = new Object(); params.value1 = "Fastabuy"; options.params = params; options.chunkedMode = false; var URL = imguploadurl + 'pid=&type=single';
I do not know what happened to my code. Please help me sort it out.
source share