-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read file from assets directory #75
Comments
Here is an example of reading data from android assets: https://github.com/alpha0010/react-native-file-access/blob/v3.0.4/example/src/App.tsx#L31-L36 (targets this file). |
Why do we need to copy the file every time I need to read it? It would be great if we could directly read from the app res directory. |
Main reason is I never needed to read assets in my projects, so I did not spend time programming it. For my projects, assets have been binary files (e.g. databases, images) unpacked to a specific location for other native code to handle; not any content I needed to see from JS side. I am open to suggestions on how to make this easier to use. A difficulty is I would prefer to avoid bloating API by adding a bunch of |
If possible it would be best to add the assets in the directory constants itself. Eg. Then we will be able to use all the existing APIs and we can remove |
Feature
Right now I am not sure how can I read file which is in
android\app\src\main\assets
Motivation
I have markdown file which I want to read and render.
The text was updated successfully, but these errors were encountered: