I am building an application with Ionic and ngCordova, but I have a problem with the camera.
When I try to take a picture, before shooting, I have a “with camera” error. This is not all the time. If I insist sometimes, I have a result. I was looking for an answer, but I can’t solve it.
I have Android 4.4.4.
And if I have the option “Cancel cancellation”, if I choose this initial mode.
Here is my code:
var options = { quality: 75, destinationType: Camera.DestinationType.DATA_URL, sourceType: Camera.PictureSourceType.CAMERA, allowEdit: true, encodingType: Camera.EncodingType.JPEG, popoverOptions: CameraPopoverOptions, targetWidth: 300, targetHeight: 300, saveToPhotoAlbum: false }; $cordovaCamera.getPicture(options).then(function(imageData) { console.log(imageData); }, function(error) { console.log(error); });
geopl source share