vinzscam/react-native-file-viewer

Failed to open pdf file in android

gomezkitty17 opened this issue · 2 comments

Hi,

We were trying to open a pdf file stored in a local file using android emulator.
The file was downloaded using RNFS and stored in document directory path.
In order to fetch the file , we've used ${RNFS.DocumentDirectoryPath} + "/" + "artworkId=28960045relMedia=43381lang=EN.pdf and in the console the value of it is
"/data/user/0//files/artworkId=28960045relMedia=43381lang=EN.pdf". However it doesn't open the file and instead it throws an error : Failed to find configured root that contains /data/data//files/artworkId=28960045relMedia=43381lang=EN.pdf
Can you advise on how to fix the issue or if we did something wrong in using the module?
Thanks

Hi, could you please post a snippet of your code?

we need to add these two things for android.

Screenshot 2019-07-03 at 13 51 17

I did automatic installation but still these files where not added automatically. so i manually added them.

for more details , please refer https://github.com/vinzscam/react-native-file-viewer/blob/master/README.md