Intent to launch image gallery

by glenys » Mon, 05 Jan 2009 13:19:53 GMT


Sponsored Links
 Hi,

I am trying to write a JUnit testcase for which I need to launch the
image gallery through code. I tried searching online for the intent
needed to launch the image gallery but could not find anything. If
anyone knows it, can you please help me out?

Thanks,

Glenys

--~--~---------~--~----~------------~-------~--~----~



Intent to launch image gallery

by hazmatzak » Mon, 05 Jan 2009 15:54:25 GMT


 You mean the Pictures app?

If you want to launch the app to browse through the images and fiddle
with them, if you examine the log when you launch it manually, an
Activity is started with an Intent like:

new Intent(Intent.ACTION_VIEW, Uri.parse(
  "content://media/internal/images/media"))

If you want to more generically launch whatever the current image
picker is (and hope to get something back), you can use:

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

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Intent to launch image gallery

by glenys » Tue, 06 Jan 2009 01:27:02 GMT


 Hi,

I am trying to write a JUnit testcase for which I need to launch the
image gallery through code. I tried searching online for the intent
needed to launch the image gallery but could not find anything. If
anyone knows it, can you please help me out?

Thanks,

Glenys

--~--~---------~--~----~------------~-------~--~----~