You are trying to read a directory… what you need is the file! Do something like this… then, you can read the file as you want.
File dir = Environment.getExternalStorageDirectory();
File yourFile = new File(dir, "path/to/the/file/inside/the/sdcard.ext");
More Related Contents:
- How to get the internal and external sdcard path in android
- Android Kotlin: Getting a FileNotFoundException with filename chosen from file picker?
- onActivityResult’s intent.getPath() doesn’t give me the correct filename
- How to use the new SD card access API presented for Android 5.0 (Lollipop)?
- Convert file: Uri to File in Android
- How to programmatically move, copy and delete files and directories on SD?
- Android: Getting a file URI from a content URI?
- How to create a file in Android?
- Android; Check if file exists without creating a new one
- Creating a directory in /sdcard fails
- How do I transfer an image from its URL to the SD card?
- Pick any kind of file via an Intent in Android
- Android Open External Storage directory(sdcard) for storing file
- Android path to asset txt file
- Using NanoHTTPD in Android
- simple HttpURLConnection POST file multipart/form-data from android to google blobstore
- Displaying images from a specific folder on the SDCard using a gridview
- Unzip a zipped file on sd card in Android application
- Android SD Card Write Permission using SAF (Storage Access Framework)
- Register to be default app for custom file type
- Copying raw file into SDCard?
- SDCard content exist but cant see them
- Android Programming: Where To Start For Creating A Simple File Browser?
- Getting all the total and available space on Android
- Android open pdf file
- Android – Save images in an specific folder
- Android: FileObserver monitors only top directory
- How to zip and unzip the files?
- Android: how do I create File object from asset file?
- Android append text file