views:

45

answers:

3

Hello,

In my application the user selects an image. When the ACTION_GET_CONTENT intent is launched it displays the dialog to select one of the available image viewers installed on the device. However I need the built in Gallery app to be chosen because upon selecting an image it launches the screen to crop the image (same thing that comes up when choosing the home screen wallpaper) which only the Gallery chooser offers.

Is it possible to skip this chooser dialog and launch the Gallery automatically? Or at least remove the other options from the list so only Gallery displays?

Thank you!

Matt.

A: 

Sorry, there isn't an intent for "launch the default gallery app that will have the user crop the image they are selecting." :}

hackbod
A: 

You cannot influence the chooser list, no. However normally you can also use explicit intents, but that's only for your own classes.

Sounds like what you actually want is an image cropper, not an image viewer. What we would need here is for somebody to register an appropriate intent at http://www.openintents.org/en/intentstable, and for developers to start building image croppers (or viewers) using this intent in their intent filters. You could also submit a patch to source.android.com to get this done for the Gallery yourself.

pjv
A: 

I've found the solution appropriate for me. The cropper is not strictly used with the Gallery, it is it's own Activity and can be launched and utilized at any time.

I first have the user select an image, then in onActivityForResult I launch the cropping Activity bundled with the image Uri from the intent specifying the image to crop.

Explains the parameters (extras) the Cropping Activity utilizes

Matt.

Matt M
Since I'm a new user I could only add one link: the following is an open source project I referenced to build my own cropping Activity.http://code.google.com/p/wwwjdic/source/browse/trunk/wwwjdic/src/org/nick/wwwjdic/ocr/crop/?r=105
Matt M