AssetFileDescriptor descriptor = getAssets().openFd("myfile.txt");
FileReader reader = new FileReader(descriptor.getFileDescriptor());
Try using the above with FileDescriptors. Seems to be the most foolproof way I’ve found to gather asset paths.
More Related Contents:
- How to open a pdf stored either in res/raw or assets folder?
- Android: how do I create File object from asset file?
- How to copy files from ‘assets’ folder to sdcard?
- How to get URI from an asset File?
- Load files bigger than 1M from assets folder
- Play audio file from the assets directory
- Android SDK manager won’t open
- How to create text file and insert data to that file on Android
- How to encrypt file from SD card using AES in Android?
- Reading Text File From Server on Android
- reading a specific file from sdcard in android
- Android: android.content.res.Resources$NotFoundException: String resource ID #0x5
- Trying to create a file in Android: open failed: EROFS (Read-only file system)
- android share images from assets folder
- How to animate a path on an Android Canvas
- List of files in assets folder and its subfolders
- Can’t get file uri from intent onActivityResult
- Android, move bitmap along a path?
- Get file path of image on Android
- Sending a File using Bluetooth OBEX Object Push Profile (OPP)
- Writing/Reading Files to/from Android phone’s internal memory
- Cordova cannot add Android failed with exit code ENOENT
- Android 11 – Accessing Files in my app Android/Data folder
- Creating a pdf file in android programmatically and writing in it
- How to load a image from assets?
- Android: Save file permanently (even after clear data / uninstall)
- Android: How to check if a rectangle contains touched point?
- How to zip and unzip the files?
- How to get the internal and external sdcard path in android
- Android append text file