When I switch the camera settings on the cord plugin, it simply ignores my options by opening it with the camera's default settings.
NOTE: When I use version 2.4, the application closes when I take the photo on the android 8
My .ts file
tirarFoto(tipoFoto, camDirect) {
return new Promise(resolve => {
let options: CameraOptions = {
cameraDirection: camDirect,
correctOrientation: true,
quality: 50,
targetWidth: 1024,
targetHeight: 1024,
destinationType: this.camera.DestinationType.DATA_URL,
mediaType: this.camera.MediaType.PICTURE
}
this.camera.getPicture(options).then((imageData) => {
this.storage.set(tipoFoto, imageData);
resolve(imageData);
}, (err) => {
console.log(err);
}).catch(err => {
console.log(err + ' erro catch');
});
});
}
Plugin version
plugin name="cordova-plugin-camera" spec="^ 4.0.3"
IONIC INFO
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.2.0
Cordova Platforms : android 7.1.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.11.4
npm : 6.0.1
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\gabriel\AppData\Local\Android\Sdk