I know to list all the photos in the gallery but I do not need the Download folder to appear in the listing. I know I can filter but I can not get it to work.
I do not want the parameter in the query to collate so that the download folder is not displayed. But if anyone knows how to display in the gallery just the photos of the camera folder is already willing.
My code that lists all works but how do you 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){
}
}