开发者

Set Default Chooser when Selecting Image?

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 d开发者_Go百科ialog and launch the Gallery automatically? Or at least remove the other options from the list so only Gallery displays?

Thank you!

Matt.


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

An open source project I referenced to build my own cropping Activity

Matt.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜