using ionic cordova plugin didn't work on open camera or gallery on android
Ionic:
ionic (Ionic CLI) : 4.12.0 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : not installed
Cordova:
cordova (Cordova CLI) : 8.1.2 ([email protected])
System:
NodeJS : v10.15.3 npm : 6.9.0 OS : Windows 10
takePicture() {
const options: CameraOptions = {
quality: 75,
destinationType: this.camera.DestinationType.NATIVE_URI ,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
sourceType: this.camera.PictureSourceType.CAMERA,
allowEdit: true,
correctOrientation: true,
targetWidth: 300,
targetHeight: 300,
saveToPhotoAlbum: true
}
alert("1");
this.camera.getPicture(options).then(imageData => {
let base64Image = 'data:image/jpeg;base64,' + imageData;
this.image = base64Image;
alert("done");
}, error => {
// Utils.showToast( null,JSON.stringify(error));
});
}