Can you help me how to open gallery in specified folder using intent? It only opening gallery from specified folder like this (screenshot below).
However, it is not returning any value or activity.
I've try a lot of methods, but none open the specified gallery folder
I tried
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
This works, but only opening gallery, not in specified folder
another one
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + "/CameraExample/");
intent.setDataAndType(uri, "*/*");
startActivity(Intent.createChooser(intent, "Open folder"));
this will open recent file, but it's not just viewing gallery, it choose a file, and return it.
Intent intent = new Intent();
Uri uri = Uri.parse(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + "/CameraExample/");
intent.setDataAndType(uri, "*/*");
intent.setAction(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
and it only shows a whitescreen. Is it possible to open gallery in specified folder? It would open like this if possible: