4

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?

adarsh
  • 6,738
  • 4
  • 30
  • 52
VaJoy Larn
  • 113
  • 13

1 Answers1

0

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)

Lauren Rutledge
  • 1,195
  • 5
  • 18
  • 27
Link Strifer
  • 546
  • 1
  • 3
  • 7