I'm creating an app using Expo
to take picture, I'm already possible to save pictures to FileSystem.documentDirectory
, but this is not what I want.
I tried to save image to Camera Roll
using code like this:
import { CameraRoll } from 'react-native';
...
...
await CameraRoll.saveToCameraRoll(photo.uri);
But it's returning a warning me to use react-native-cameraroll
instead of react-native
. But as I see in the document of the react-native-cameraroll
, it's seems not supporting Expo
.
Is there any way to save image to Camera Roll in Expo
?
I found the solution to this, instead of using CameraRoll
you can use MediaLibrary
to MediaLibrary.saveToLibraryAsync(localUri)
More details on the documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With