When i call this code
try { this.imagePicker.getPictures({maximumImagesCount: 5}).then((results) => { for (let i = 0; i < results.length; i++) { try { let result = results[i]; } catch (e) { break; } } }, (err) => { }); } catch(e){ }
then app will be unfortunately closed
I also tired remove plugin and add plugin link: https://ionicframework.com/docs/native/image-picker/
Is there any solutions?
Thanks in advance
-Anand
I think it’s because of permission in android? I’m just not too sure about it… maybe others can help too…
I’m using Android 5.1, actual code is…
pickImages(){
if(!ImagePicker.installed()){
this.glopal.showAlertDialog('Error1','Plugin not Found!');
return;
} else this.glopal.showAlertDialog('ImagePicker','Plugin Found!');
if(!this.imagePicker.hasReadPermission()){
this.imagePicker.requestReadPermission();
return;
}
this.imagePicker.getPictures({maximumImagesCount: 5}).then((results) => {
for (let i = 0; i < results.length; i++) {
try {
let result = results[i];
this.pushFileToList(result,5)
} catch (e){
this.glopal.showAlertDialog('File Attach Failed',e.toString());
break;
}
}
}, (err) => {
this.glopal.showAlertDialog('Error',err.toString())
});
}
I am also facing same issue. how to resolve it?
uddyvky
5
Yes it may be because of the permission. Try adding the permission to access the files.
samraj8
6
I am also facing this problem, any other solution?
samraj8
7
have you any solution?
-sam
do you add google maps plugin ?
if you add it try to remove google maps plugin and try again
i think there is some conflict with google maps plugin