Hello guys!
I have a problem with the image-picker plugin.
The plugin opens the gallery and I can select the image,
however it returns the empty image list.
I’m using Ionic 4 with Capacitor on the Android platform
This is my code
import { ImagePicker } from '@ionic-native/image-picker/ngx';
constructor(private galeria: ImagePicker) {}
getFotoGaleria(){
console.log("getFotoGaleria: ", this.configuracao);
let size = parseInt(this.configuracao['largura_imagem']);
let options = {
maximumImagesCount: 1,
width: size,
height: size,
quality: 100
}
this.galeria.getPictures(options).then((results) => {
console.log("results imagem: ", results);
this.loading = this.base.mostrarLoading(this.translate.instant('amostragem.localizando_papel'));
this.ngZone.run(() => {
this.getResultadoGaleria(results);
});
}).catch((err) => {
console.log("ERROR ao pegar foto da galeria: "+ err);
});
}
Plugin installation command
npm install --save cordova-plugin-telerik-imagepicker
ionic info
Log Android Studio
Could anyone help me with this issue?
Thanks in advance!