Using ContentResolver and Regex to get music from specific folder
问题 I am currently trying to retrieve music files within a specific folder from the ContentResolver . I only want the files in that folder, not from a subfolder. I achieved to get these files by doing this: String pattern = f.getAbsolutePath() + "/[^/]*"; // f is the folder where I want to search ArrayList<TrackInfo> retVal = new ArrayList<TrackInfo>(); Cursor mCursor = null; String selection = MediaStore.Audio.Media.IS_MUSIC + " != 0 AND " + DATA + " LIKE '" + f.getAbsolutePath() + "/%'"; Uri