John Brunner John Brunner - 7 months ago 27
Android Question

'Error capturing image' with Phonegap on Android

I need to capture an image with my Phonegap app. On iOS everything works fine but on Android (via Phonegap Build) it throws an error with "Error capturing image".

I added the following lines to my config.xml but that doesn't change anything:

<feature name="Camera">
<param name="android-package" value="" />
<feature name="" />
<feature name="" />
<feature name="" />
<feature name="" />
<feature name="" />

My API call looks like that:

$(document).on('click', '#cameraPreview', function() {
pictureSource =;
destinationType =;, onGetPictureFail, {
quality: 40,
sourceType: Camera.PictureSourceType.CAMERA,
destinationType: Camera.DestinationType.FILE_URI,
allowEdit: true,
encodingType: Camera.EncodingType.JPG,
targetWidth: 1000,
targetHeight: 1000,
saveToPhotoAlbum: true,
correctOrientation: 1

I use Phonegap 3.7 with Phonegap Build.


Ok, now I know the answer. The problem is the saveToPhotoAlbum: true option. Android doesn't recognize this. When I delete this option everything works fine.