Crash app when get images on Android 6.0


#1

I used this cordova plugin Image Picker

const options = {
      maximumImagesCount: 5,
      outputType: 0,
      quality: 90
    };
      this.imagePicker.getPictures(options).then((results) => {
        console.log('results: ', results);
      }, (err) => {
        console.log('error get images: ', err);
      });

Works perfect on iOS, but Android, Forces Stop without log.
Tested with:


#2

It worked with previous ionic version. Now, I don’t know why? Please help


#3

The same problem here , did you found any solution ?


#4

Stuck with me so far. Did not know why.


#5

@huyle i just checked the github repo , https://github.com/Telerik-Verified-Plugins/ImagePicker/commits/master
i think they did a new commit 4 days ago , maybe that what cause the problem ?


#6

Yes. I think so. Thanks, I will check it later.:grinning::grinning:


#7

ok , tell me if you figure out a solution :smiley:


#8

Move code to controller, not use Service/provider. It works.


#9

can you explain more ? or give me your controller code !


#10

I did tried to open image picture in page component itself, still the app crashing


#11

I have never managed to get this to work. But there is an alternative. Just use the Cordova Camera plugin and set the SourceType to PictureSourceType.PHOTOLIBRARY or PictureSourceType.SAVEDPHOTOALBUM and uninstall the image picker.


#12

This is great, How to make it select multiple images ?


#13

The camera plugin itself does not support multi-file picking as far as I can tell, sadly.