-
Notifications
You must be signed in to change notification settings - Fork 971
Closed
Labels
questionstaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Hii, I am using below specifications for running the project
"react-native": "0.74.3",
"react-native-share": "^11.0.3",
API Level- 34, and
Mobile model- Oneplus Nord Lite 3 5g
I am facing the issue, while I am selecting multiple images for sharing through media, the selected images are not showing in share modal as clipboard images, But sharing is done perfectly ( like whatsapp, email etc). For single image it is showing in the share modal preview.
For references I have attached the screenshots below.
code snippet:
const openGallery = () => {
const options = {
mediaType: "photo",
selectionLimit: 4, // Limit to 4 images
};
launchImageLibrary(options, async (response) => {
if (response.didCancel) {
console.log("User cancelled image picker");
return; // Exit early if the user cancels
}
if (response.errorMessage) {
console.log("ImagePicker Error: ", response.errorMessage);
return; // Exit early on error
}
console.log("Response...................", response);
try {
// Process selected images
const imageArr = await Promise.all(
response.assets.map(async (item) => {
const base64Data = await RNFS.readFile(item.uri, "base64");
return `data:${item.type};base64,${base64Data}`; // Use item.type for MIME type
// return item.uri;
})
);
// Prepare share options
const shareOptions = {
message: "Check out these images!",
urls: imageArr, // The array of image data URLs
subject: "Cart Details",
failOnCancel: false,
};
// Share the images
await Share.open(shareOptions);
bottomSheetModalRef.current?.dismiss(); // Dismiss the modal if needed
} catch (error) {
console.log("Error processing or sharing images: ", error);
}
});
};
Metadata
Metadata
Assignees
Labels
questionstaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.

