have anyone make the library react-native-image-picker work on Android below version 5?. In my case when i call to showImagePicker it always goes to didCancel.
const options = {
quality: 0.7,
maxWidth: 500,
maxHeight: 500,
storageOptions: {
skipBackup: true
},
};
ImagePicker.showImagePicker(options, (response) => {
if (response.didCancel) {
console.log('User cancelled photo picker');
}
else if (response.error) {
console.log('ImagePicker Error: ', response.error);
}
else if (response.customButton) {
console.log('User tapped custom button: ', response.customButton);
}
else {
var image = 'data:image/jpeg;base64,' + response.data
}
});
When i press Choose from Library or Take Picture it shows the Gallery or Camera but right away the completion function gets called with response.didCancel = true, is not waiting for the user to select so the completion could have the image.
Any thoughts?