Cordova camera is not working in Android marshmallow. App crashes when the camera captured picture are selected. This is the same case when attaching the image from photo library. I can access the Camera and photo library, but app get crashed once i selected the photo after capturing using camera. The issue is not found in KitKat version. Below i included the Content security policy used in my code and also the cordova camera code.
CSP meta tag:
<meta http-equiv="Content-Security-Policy" content="default-src gap: *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://....">
cordova camera code :
src = (src == 'library') ? Camera.PictureSourceType.PHOTOLIBRARY : Camera.PictureSourceType.CAMERA;
navigator.camera.getPicture(onSuccess, onFail,
{
quality: 40,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: src,
encodingType: Camera.EncodingType.JPEG,
saveToPhotoAlbum: false
}
);
Cordova Version is 7.0.1 and Android platform version = '6.2.3'
Also here i am attaching the error i got in Android Studio.