I'm using a fileBrowser to find the files on the phone, but I wanted to show all files that my app can open to the user, and then the user chooses one. Like the Music Player, that show all songs on phone, on the sdcard and in the internal memory, not only the ones in the folder where the user is.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
I don't know what FileBrowser implementation you are using but a good one should accept a FileFilter. You can implement your own filter providing code for
public abstract boolean accept (File pathname)
Use file name filters while listing out the files. The below sample lists out all mp3 files in a given
root
directory (Note - The below code doesn't do it recursively for all folders underroot
) -