0

How can I use default Android gallery to display only application's photos? Basically I need to display only my application photos on gallery.

Many Thanks

Chinthaka
  • 966
  • 1
  • 13
  • 42

1 Answers1

1

Sure! You have to parametrize the Intent that is launching the Gallery Application: Set Action to Intent.ACTION_PICK. Set MIME type to one of the image types, or image/* . Set the data to the file to be shown's Uri.

Intent galleryStarter = new Intent();
galleryStarter.setAction(Intent.ACTION_PICK);
galleryStarter.setType("image/*");
galleryStarter.setData(Uri.fromFile(imageFileToShow));
context.startActivity(galleryStarter);
Andras Balázs Lajtha
  • 2,576
  • 25
  • 32
  • Thanks for the reply. But I am getting an exception called ActivityNotFoundException. In my application I am taking number of photos. So is there a good way to series of photos? – Chinthaka Oct 12 '11 at 10:51