Tell us which versions you are using:
Tell us to which platform this issue is related
on a camera screen we have a button of upload, press the upload button opens the ImagePicker.openPicker, select nothing and go back Error User cancelled image selection along with the the camera capture button doesn't take any picture, camera capture function is called but does not allow the image to preview because of Error User cancelled image selection
on a camera screen if we navigate to gallery then coming back without even selecting anything the camera function should work which is working if clicked but the screen should change to preview which doesn't change. All I see is the camera still on which shouldn't be on.
await ImagePicker.openPicker({}).then({}).catch((err)->{console.log(err)})
try{whateverintheFunction }catch(err){console.log(err)}
changes in android.manfest.xml file under activity section android:launchMode="singleTop"
none of these solution works, kindly suggest me something TIA
Used like this and works like charm;
try {
const image = await ImagePicker.openCropper({
path: uri,
height: 385,
width: 1000,
});
} catch(error){
console.log("Error:", error);
}
@kutaisan i am implementing it if it occurs again what is the fix then ?
inside catch(error)...
if (error.code === 'E_PICKER_CANCELLED') {
return false;
}
Most helpful comment
inside catch(error)...