1
I know how to list all the gallery photos but I need the Download folder not to appear in the list. I know I can filter but I can’t make it work.
I do not parameter in the query I must paste so that the download folder is not displayed. But if someone knows how to display in the gallery only the photos from the camera folder is already willingly.
My code that lists all works but how does it filter some folders?
Cursor cursor = getActivity().getContentResolver().query(data.getData(),
new String[] { MediaStore.Images.Media.DATA },
null, null, null);
if(cursor != null && cursor.moveToFirst()){
try{
int indice = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
caminho = cursor.getString(indice);
}catch(Exception e){
}
}