The documentation for each intent protocol (action) should describe the
expected data in and out, including extras.  If it doesn't, the doc needs to
be fixed.  It is generally not safe to rely on  just whatever stuff you
happen to find in there from one particular app.

On Fri, Sep 18, 2009 at 8:44 AM, Neilz <[email protected]> wrote:

>
> How do I know what extras an Intent contains when it returns from an
> activity result?
>
> For example, I have used an Intent.ACTION_GET_CONTENT to pick an image
> from the gallery. When the result is returned, I can get the URI of
> the image from intent.getData().toString(). In another scenario, I use
> a MediaStore.ACTION_IMAGE_CAPTURE to get a new photo. When this result
> returns, I know (from looking at other people's code) that you can get
> the image itself from data.getExtras().get("data");
>
> But how can I get the contentUri of this new photo?
>
> A more relevant question, is how can I inspect the Intent so that I
> know what extras and what data it contains? There seems to be a
> differing combination depending on what the original Intent was.
>
> Many thanks for any suggestions.
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to