For testing purposes I copied the full example found on the phonegap camera API and I put an alert on onPhotoDataSuccess
to test when the function is fired. On the
I don't know whether this is right solution or not but its work for me perfectly. It would be batter to trace your log cat and found exact issue.
Try to use navigator.camera.PictureSourceType
instated of pictureSource
. so it looks like
and same way replace in Javascript code as well
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI });
OR
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, destinationType: navigator.camera.DestinationType.DATA_URI });
Update: Try to save your corodova.js locally and call from local dir, so your dir should like
assets/www/js/cordova.js
Working Code
Hope this will help you !!!