Reputation: 61
Is it possible to save an image coming from project's assets folder in the gallery and/or share it using the Share api in React Native? If not is it possible to do it natively in Android and iOS?
Upvotes: 2
Views: 1594
Reputation: 22189
I would suggest you to use react-native-share
library, since the React Native's share library' features are limited, and url sharing is only supported in IOS
Here are the useful methods available
// You need this one.
You can share via base64 or file url directly
The example is really simple to use
let shareImageBase64 = {
title: "React Native",
message: "Hola mundo",
url: REACT_ICON,
subject: "Share Link" // for email
};
Share.open(shareImageBase64)
Upvotes: 1