1

I would like to use the built-in gallery application to display images stored in an application specific folder - images stored in the folder returned by the getExternalFilesDir() method. There's plenty of code similar to the following that displays all images, but I need to display images stored in a specific folder:

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent, TEST_RESULT);

An answer to a similar question referenced this solution:
Get/pick an image from Android's built-in Gallery app programmatically

However, I do not want the user to pick a photo, but rather just display them. One answer referred to the calling intent.setType with "file:///sdcard/image/*".

However, this did not appear to work for anyone in the responses and it did not work for me either (I tried various things like "file://" + getExternalFilesDir() + "/*", etc...). Has anyone had any luck invoking the gallery app for a specific folder?

Community
  • 1
  • 1
user867427
  • 21
  • 2

0 Answers0