[🐛] didCancel : true, After selection of image from Gallery in Android.
See original GitHub issueHI,
I have use the latest release package of the image picker. I have facing problem when pick image from the gallery, when i tap on my button I will see the gallery and photo app for selection, And after I choose the photo from the app, and check the response, there will be { didCancel : true }, i haven’t get the image object which is i have selected. In Camera it’s work perfect.
launchImageLibrary(
{
mediaType: 'photo'
},
(response) => {
console.log("=== response ==", response)
},
)
I have check on the imagePickerModule.java in which the status is different so that it will happen.
if (resultCode != Activity.RESULT_OK) {
if (requestCode == REQUEST_LAUNCH_IMAGE_CAPTURE) {
deleteFile(cameraCaptureURI, reactContext);
}
callback.invoke(getCancelMap());
return;
}
Android Version : 11 Phone : MI
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:19 (2 by maintainers)
Top Results From Across the Web
[🐛] didCancel : true, After selection of image from Gallery in Android.
I have facing problem when pick image from the gallery, when i tap on my button I will see the gallery and photo...
Read more >react-native-image-picker on Android 4.x - Stack Overflow
When i press Choose from Library or Take Picture it shows the Gallery or Camera but right away the completion function gets called...
Read more >How to pick images from Camera & Gallery in React Native app
In the above code, we will open an Image picker as you Click on “chooseImage” and will show the selected image on the...
Read more >@2hats/react-native-image-picker - npm package | Snyk
A React Native module that allows you to use native UI to select media from the device library or directly from the camera...
Read more >react-native-image-picker.Response.didCancel JavaScript ...
openPicker() { const options = { title: 'Select Photo', storageOptions: { skipBackup: true, path: 'images', }, }; ImagePicker.showImagePicker(options ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turn On your MIUI Optimization in Developer Option. It solved my issue.
Please reset your device, it’s work fine.