Top "Android-file" questions

Specifically the Android `File` class, but may also refer to the generic concept of files under the Android operating system

Show Image View from file path?

I need to show an image by using the file name only, not from the resource id. ImageView imgView = new …

android imageview android-imageview android-file
android.os.FileUriExposedException: file:///storage/emulated/0/test.txt exposed beyond app through Intent.getData()

The app is crashing when I'm trying to open a file. It works below Android Nougat, but on Android Nougat …

android android-file android-7.0-nougat
How to access /storage/emulated/0/

I have written a code to record audio and save it to below file location. private String getFilename() { String filepath = …

android android-sdcard android-file
How to create directory automatically on SD card

I'm trying to save my file to the following location FileOutputStream fos = new FileOutputStream("/sdcard/Wallpaper/"+fileName); but I'm getting …

android android-file
Difference between mkdir() and mkdirs() in java for java.io.File

Can anyone tell me the difference between these two methods: file.mkdir() file.mkdirs()

java android directory android-file
Simple mediaplayer play mp3 from file path?

I have a very simple mediaplayer that play background. It calls file from the apk, but I want it to …

android android-mediaplayer android-sdcard android-file
Trying to create a file in Android: open failed: EROFS (Read-only file system)

This line: final FileOutputStream outputStream = new FileOutputStream(name); results in a FileNotFoundException with the message being /2ozjfFQzwv: open failed: EROFS (…

android file file-io filesystems android-file
Save bitmap to file function

I'm trying to save a bitmap to file and a specific directly using a function I've created. It's not working. …

android file-io android-intent bitmap android-file
Load a file from external storage to Inputstream

i have a video file in my external directory. how can i load it to inputstream variable. For the time …

android inputstream android-file
List all the files from all the folder in a single list

Hi I am looking for the solution to list all the files from root/Android device. Suppose there are 3 folder …

android android-file