0
任何人都可以使圖書館react-native-image-picker在Android 5以下的版本上工作?在我的情況下,當我打電話給showImagePicker它總是去didCancel。Android 4.x上的react-native-image-picker
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
}
});
當我按下選擇從圖書館或拍照它顯示的畫廊或相機,但馬上完成函數被調用response.didCancel =真,是不是等待用戶選擇這樣完成可能有圖像。
有什麼想法?