How to open the image in the Android's default gallery [duplicate]
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 o开发者_运维技巧f using ImageView to view the image. Thank you very much!
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);
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);
精彩评论