const openCamera = async () => {
try {
const image: any = await ImagePicker.openCamera({
width: width || 400,
height: height || 400,
cropping: mediaType === 'video' ? false : true,
// multiple: source === 'productImage' ? true : false,
mediaType: mediaType,
includeBase64: true,
cropperActiveWidgetColor: cropperActiveWidgetColor || accentColor,
cropperCircleOverlay: cropperCircleOverlay,
cropperToolbarTitle: Edit ${title},
});
setPetProfilePictureDetails(image);
} catch (error) {
console.error(error);
onClose(); // Properly close the modal
}
};
When i am calling this function, is am getting this error.
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/com.zventory/files/Pictures/image-27bc1e1d-db4f-46d6-b8ef-092a5bf85dfc3398090521745550681.jpg.
const openCamera = async () => {
try {
const image: any = await ImagePicker.openCamera({
width: width || 400,
height: height || 400,
cropping: mediaType === 'video' ? false : true,
// multiple: source === 'productImage' ? true : false,
mediaType: mediaType,
includeBase64: true,
cropperActiveWidgetColor: cropperActiveWidgetColor || accentColor,
cropperCircleOverlay: cropperCircleOverlay,
cropperToolbarTitle:
Edit ${title},});
setPetProfilePictureDetails(image);
} catch (error) {
console.error(error);
onClose(); // Properly close the modal
}
};
When i am calling this function, is am getting this error.
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/com.zventory/files/Pictures/image-27bc1e1d-db4f-46d6-b8ef-092a5bf85dfc3398090521745550681.jpg.