I am developing an Android application in an Android application. I add a camera using the cordova plugin
config.xml
<feature name="Camera"> <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" /> </feature>
code for shooting
function snapPicture () { navigator.camera.getPicture (onSuccess, onFail, { quality: 100, sourceType: navigator.camera.PictureSourceType.CAMERA, mediaType: navigator.camera.MediaType.PICTURE, destinationType: destinationType.FILE_URI, encodingType: navigator.camera.EncodingType.JPEG, correctOrientation: false, saveToPhotoAlbum: true }); //A callback function when snapping picture is success. function onSuccess (imageData) { var image = document.getElementById ('picture'); alert("path : "+imageData); image.src = imageData; } //A callback function when snapping picture is fail. function onFail (message) { alert ('Error occured: ' + message); } }
The code works fine in all versions of Android awaiting Android Kitkat. In Kitkat, I get the answer as " Image Capture Error "
can someone tell me what the problem is in Kitkat Thanks in Advance ...!
user4928488
source share