React Native: Save local PDF file to users device - react-native

I have a PDF stored in my assets folder in my react native projects. I would like to give the user the ability to download this PDF to their device. I currently have it displaying on screen, but I can't figure out how to download the asset to the users device. I've seen plenty of examples of how to download items using a URL but nothing for local assets. The application is being build out in React Native for both iOS and Android.

Related

Expo Camera on Android doesn't work well as on Web

I'm developing a React Native app. I'm using Camera-Expo.
When I test it and take a photo on Web, it is saved as 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg....' and it can be saved on cloudinary.com
Though when I test it on my phone using Expo, the photo is saved as 'file:///data/user/0/host.exp.exponent/cache/Experie.....' and it is not saved on cloudinary.com
How can I save the photos I make by phone on cloudinary?
Use ImageManipulator from Expo to change the captured file to base64 and then you can upload it on cloudinary

generate CSV file from json object on button clicked in react native

I am building and mobile app for android using react native, I have json array object and I want to download this data as CSV file on button clicked, I have checked many of existing packages but all for web applications not mobile applications. is there anyway or trick to do that or is there and new packages i am missing. help me please
It looks like react-native-fs (https://www.npmjs.com/package/react-native-fs) supports IOS and Android Devices. This allows you to create Files on the Device, and write any File content.

React Native Expo Sharepoint Image not showing on Android but does on IOS

True a php API I get the json from my sharepoint and all the data. Also the Image url that is stored there. Now the issue is when I get the image data and use it in React Native Expo on IOS it display's but on Android it doesn't.
Why is this, I already searched on Google but didn't find an answer.

React native document picker not showing local files

i am using react-native-document-picker for my ios app, i am unable to pick files from local data as it only giving options from iCloud.
Anyone knows how to access local files in ios?

How to download assets on phone and use it in a react native app

I want to download images from server and use them in application.
Like many games on mobile do.
I also want that these files can not be seen in user's gallery and they can not delete it manually in React Native App
react-native-fs package can be used to download images from server and use them in your application.