4
votes

Here are some images from websites and I want to save them to Android camera roll.

I found out that React Native has an function CameraRoll.saveImageWithTag which could save certain image into the camera roll, but the param tag should be a local URI, such as "file:///sdcard/img.png". So how to save the image in Android React Native if the image source was not local?

1
Did you ever solve this issue? - Chris Geirman
Did you ever solve this issue? - Levis
Did you ever solve this issue? - Bruno Braga

1 Answers

1
votes

You need to download the file first. You can use react-native-fetch-blob to do that

Or, if you are using Expo you can use FileSystem.downloadAsync.

Those will give you a local Uri to use with CameraRoll.save... (I think it has a different name now)