Android MP3 file Filtering form sdcard
问题 I have developing the application to fetching data from sd card. I used this option for filtering but when I used logcat I found that I only get data of only file sdcard/some_dir But I have sound files into different folder so if possible give me universal code to fetch all the mp3 file form the sdcard. class FileExtensionFilter implements FilenameFilter { public boolean accept(File dir, String name) { return (name.endsWith(".mp3") || name.endsWith(".MP3")); } } 回答1: This is mine AudioFilter