I use ionic2 and want to use cordova-plugin-image-picker, but it not worked when I test my app in emulator (with command ‘ionic emulate android’). Application closes with error “Unfortunatly, app has stopped” when I call Image Picker. Although, app works when I install my app directly on device. Is there any limitations on cordova plugins in emulators?
I tested on blank application, followed instructions from http://ionicframework.com/docs/v2/native/image-picker/
Here is a code to call image picker:
selectImages() {
var options = {
maximumImagesCount: 10,
width: 800,
height: 800,
quality: 80
};
ImagePicker.getPictures(options).then((results) => {
for (var i = 0; i < results.length; i++) {
console.log('Image URI: ' + results[i]);
}
}, (err) => {
});
}