Skip to main content

All Questions

0 votes
0 answers
1k views

Unable to read a PDF file at /storage/emulated/0/Android/data folder

I am using react-native-html-to-pdf to generate a PDF from an HTML string. It works file and I can see that the generated PDF path is /storage/emulated/0/Android/data/**MY_PACKAGE_NAME**/files/...
Chaudhry Talha's user avatar
0 votes
2 answers
403 views

I'm getting 'undefined is not an object (near '...}).fs.writeFile(' when trying to download base64 image png in react native React Native

Here is my code: const saveImg = async (base64Img: string, success: Function, fail:Function) => { const isAndroid = Platform.OS === "android" const isIos = Platform.OS ...
Robert Vitoriano's user avatar
1 vote
0 answers
1k views

React Native download manager fails with status code 16 when downloading on Android

I have been trying to fix an issue with downloading a zip file from our service on our Android app. The iOS works fine, but on Android I get the following error: ExceptionsManager.js:149 Error ...
Rameez Hussain's user avatar
0 votes
1 answer
8k views

Save Files in the Android data folder

import RNFetchBlob from 'rn-fetch-blob' var path = RNFetchBlob.fs.dirs.DocumentDir RNFetchBlob .config({ path: toFile }) .fetch('GET', fromUrl) ...
Rover's user avatar
  • 768
1 vote
0 answers
851 views

rnFetchBlob Error: Download manager failed to download from "url"

i'm trying to download a pdf file from url but i'm getting this error Error: Download manager failed to download from "myurl" status code=16 i can download the pdf file when i use the same ...
Samy Tcheikman's user avatar
1 vote
0 answers
457 views

React Native react-native-image-picker, react-native-fetch-blob workaround to clear images taken from camera

You have probably noticed that storageOptions: { cameraRoll: false } parameter is not working on Android when using react-native-image-picker library. Instead it saves pictures taken from camera to ...
Anton Semenichenko's user avatar
1 vote
1 answer
2k views

react native run android has an error. Cannot change dependencies of configuration ':packagename:androidApis' after it has been resolved error

I have a React Native project with many libraries like React Native Fetch Blob, React Native Camera, etc. For run the project I clone my repository and install node modules so run react-native run ...
Majid Lotfinia's user avatar
3 votes
3 answers
5k views

React-Native, Pdf showing on android simulator but getting error on actual android device

I have installed react-native-pdf and rn-fetch-blob packages to show pdf file.It work's fine on simulator but for some reason i am getting "Error: open failed: ENOENT (No such file or directory)". ...
sandeepKumar's user avatar
0 votes
1 answer
897 views

RNFetchBlob.mkdir got 1 arguments, expected 2

When i try to setup ongoing react-native project in that one of the plugin is react-native-fetch-blob i'll try many but can't resolve this issue. also i remove that plugin from app and resetup all ...
Hiren Vaghela's user avatar
2 votes
2 answers
10k views

Get the array of filenames stored in document directory in React Native

CASE I have downloaded audio files to my document directory under the folder named /tracks/ as : RNFetchBlob.fs.dirs.DocumentDir + '/tracks/' No doubt I can read each audio by their name as : ...
Bikram Thapa's user avatar
  • 1,339
0 votes
1 answer
2k views

How can I change my local image to a file type in React Native?

I want to change my local image into file type so I can send it on a api. How can I do it? How can it be done with react-native-fetch-blob Please help. This is what I'm trying so far but it gives ...
Shubham Bisht's user avatar
1 vote
1 answer
1k views

RNFetchBlob can't download properly ( creating 0 B files)

I'm using RNFetchBlob to download some pictures and save them in the download directory. When I press the download button, it says the download finishes but there's just an image file with 0 bytes ...
Zeynab Rostami's user avatar
1 vote
1 answer
584 views

React Native: Error while building project

Initially, everything was working fine, I was trying to update the build:gradle and SDK versions I am getting the following while building the project Gradle sync failed: More than one variant of ...
Mr Robot's user avatar
  • 897
7 votes
1 answer
9k views

How to list files in assets folder react-native

I created a folder with some subfolders in android/app/src/main/assets/. I re-compiled the app and I am trying to get a list of the folder/files I put in there. However, whenever I run one of the ...
four-eyes's user avatar
  • 12.6k
15 votes
3 answers
28k views

Open a file (pdf, word, excel, png etc.) on device with its default application in react-native

I'm using react-native-fs to download a file(pdf, word, excel, png etc.) and I need to open it in other application. Is it possible to open downloaded file with Linking or better open a dialog with ...
mradziwon's user avatar
  • 1,246