[android-developers] Re: Choosing an Image
Try this instead:
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, 1);
Jeff
Visit Trackaroo.com!
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno
On Jul 23, 4:44 pm, KG <kevinconca...@gmail.com> wrote:
> Hi Everyone,
>
> I'm trying to allow the user to choose an image to load into my app
> using the default image browser on the phone.
> Here is what I have so far:
>
> Intent findImageIntent = new Intent(Intent.ACTION_GET_CONTENT);
> findImageIntent.setType("image/*");
> startActivityForResult(Intent.createChooser(findImageIntent, "Select
> Picture"), IMAGE_SELECT);
>
> This correctly launches the image chooser and I'm able to click one
> which returns me to my main activity. However, it does not load the
> image I selected, returning a -1 for resultCode in onActivityResult.
>
> Anyone know what I'm doing wrong?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home