1

Is there a way to open an image file (mainly jpeg) with:

RNFetchBlob.android.actionViewIntent(res.path(), item.mime_type);

and then allow to save the image, I'm trying on an emulator Nexus 4 and API 25 but both from the gallery and from the photo there is no option to save the image ... thanks!

NPovlsen
  • 337
  • 1
  • 16
Nobady
  • 1,074
  • 2
  • 11
  • 35

2 Answers2

2

You can use react-native-image-view url: https://github.com/antonKalinin/react-native-image-view

It provides feasibility to custom render for footer and control types. There you can make a download button on click of button, write a code for image download using RNFetchBlob.

Muni Kumar Gundu
  • 512
  • 5
  • 11
  • thanks guys, both solutions are acceptable .. as soon as I finish I accept the answer I used ;-) – Nobady Oct 30 '19 at 10:31
1

show an image in image viewer

android.actionViewIntent(PATH_OF_IMG, 'image/png')

visit this link for for more info : https://github.com/joltup/rn-fetch-blob/wiki/Android-API

Jaspalsinh Gohil
  • 941
  • 1
  • 9
  • 20
  • yes, I already do this but can I download it from the image viewer? or does it depend on the device? – Nobady Oct 30 '19 at 10:10
  • 1
    check out this i think this link resolve your issue : https://reactnativecode.com/download-image-from-url-into-gallery-folder/ – Jaspalsinh Gohil Oct 30 '19 at 10:18
  • 1
    thanks guys, both solutions are acceptable .. as soon as I finish I accept the answer I used ;-) – Nobady Oct 30 '19 at 10:31