1

I'm trying to open all the photos taken with my app using the native Gallery.

Here is my code:

Intent intentBrowseFiles = new Intent(Intent.ACTION_VIEW);
intentBrowseFiles.setType("image/*");
                    Uri uri = Uri.parse(Environment.getExternalStorageDirectory() + "/DCIM/MyApp");
                    intentBrowseFiles.setData(uri); 
                    intentBrowseFiles.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity(intentBrowseFiles);

If I don't set the setData the gallery opens, but in the root, if I set, my app crashes.

Is there a way to open it in the Gallery in a specific directory?

Anyway, thank you!

Bruno Almeida
  • 166
  • 3
  • 14
  • Did you ever work out a solution? I'm starting to believe that you're simply not allowed to do this. I've tried doing something similar but all I get is a blank gallery screen. – oobayly Apr 18 '13 at 15:25

0 Answers0