Construct MediaStore URI for specific folder

后端 未结 3 2107
你的背包
你的背包 2020-12-11 07:45

For example if a have two directories /sdcard/Music/Music-1 and /sdcard/Music/Music-2 how can I construct a URI to get the files in Music-1

3条回答
  •  一整个雨季
    2020-12-11 08:26

    Do exactly this,

    Cursor mCursor = getContentResolver().query(uri1, Selection, 
                android.provider.MediaStore.Audio.Media.DATA + " like ? ", 
                new String[] {str},
                null);
    

提交回复
热议问题