3

Possible Duplicate:
How to open phones gallery through code

I have outputted a image in my app. Can I call the default Android's gallery to display the image instead of using ImageView to view the image. Thank you very much!

Community
  • 1
  • 1
newstartgirls
  • 281
  • 1
  • 8
  • 19
  • I want to use the default Image Viewer in the android system. Since some function of the Viewer I would want to use. Can skip go into the gallery and go in the default Image Viewer – newstartgirls Sep 24 '11 at 05:18

2 Answers2

2

try this for open gallery

Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);//
startActivityForResult(Intent.createChooser(intent, "Select Picture"),10);
Niranj Patel
  • 32,980
  • 10
  • 97
  • 133
2

You should be able to display the image in gallery using this code..

Intent intentquick = new Intent(Intent.ACTION_VIEW);
intentquick.setDataAndType(<full path to image to be displayed>,"image/*");

intentquick.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intentquick);
bluefalcon
  • 4,225
  • 1
  • 32
  • 41