code is as below .
when I press button it goes to below code
and I get come to take photo log well. but after taking picture,
it goes to catch clause saying
this is error: error Error capturing image.
why is this happened?
try{
const options : CameraOptions={
quality:50,
targetHeight:600,
targetWidth:600,
destinationType:this.camera.DestinationType.DATA_URL,
encodingType:this.camera.EncodingType.JPEG,
mediaType:this.camera.MediaType.PICTURE,
saveToPhotoAlbum:true
}
console.log("come to take photo");
const result= this.camera.getPicture(options).then(imagedata=>{
console.log("get pic");
console.log(imagedata);
// if(imagedata!=undefined){
// this.picdata=imagedata;
// this.upload(value);
// }
}).catch(e){
console.log("this is error: error "+e);
}
}