If you look at how the MMS App handles this:

http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=blob;f=src/com/android/mms/ui/ComposeMessageActivity.java;h=b4a00709c596b5da5cefc1486924aab6bbbf63fe;hb=HEAD#l2162

This is what they do:

Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);

My guess is that
intent.getStringExtra(android.content.Intent.EXTRA_STREAM) returns
null because the value stored for that key isn't a string but a URI.

I want to do the same thing in an app I'm working on, but I won't have
a chance to work on it until tomorrow. :(  But I'm glad that you're
working through all the issues now so it should be easier for me
tomorrow.  :)

Bill

On Tue, Nov 25, 2008 at 12:46 AM, Freddy <[EMAIL PROTECTED]> wrote:
>
> Thank you for your response.  This worked great.  Do you know how I
> can extract the jpg data from the Intent?  Looking at the intent in
> the debugger I don't see any data.  Here's my code:
>
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>
>        Intent intent = getIntent();
>        String type = intent.getType
> ();                                              // return image/
> jpg ... that's good
>        String stream = intent.getStringExtra
> (android.content.Intent.EXTRA_STREAM);  // returns null ... ouch
>        String text = intent.getStringExtra
> (android.content.Intent.EXTRA_TEXT);      // return null
>        Bundle extras = getIntent().getExtras();
>        if(extras != null)
>        {
>                String test = extras.getString(what goes here);  // need docs
> for ACTION_SEND??
>        }
>
>
> The docs 
> http://code.google.com/android/reference/android/content/Intent.html#ACTION_SEND
> say the data should be in the EXTRA_STREAM but it's null.  Any ideas?
> I assume it might be stuffed in the bundle somewhere but I'm not sure
> how to figure out which named string to use in the extras.getString()
> call to find it.  Is there some docs I'm overlooking or maybe
> something I can see in the debugger?
>
> Thanks.
>
> On Nov 24, 12:38 am, Bill Napier <[EMAIL PROTECTED]> wrote:
>> Yes.  Register an intent-filter for your activity that captures:
>>
>> action: android.intent.action.SEND
>> category: android.intent.category.DEFAULT
>> mimeType: image/*
>>
>> If you look at the AndroidManifest.xml for the Mms application in the
>> git repo you can see an example of it.
>>
>> b
>>
>>
>>
>> On Sat, Nov 22, 2008 at 10:11 PM, Freddy <[EMAIL PROTECTED]> wrote:
>>
>> > After taking a picture on the G1 the user is prompted with Save | Set
>> > As | Share | Delete.  If Share is selected then they're taken to a
>> > "Share Picture Via" dialog.  Currently the options Google mail and
>> > Messaging are in the dialog.  I want to add a link to my program which
>> > can share the photo with a different service
>>
>> > Is it possible to add a custom link in the "Share Picture via" dialog?
>>
>> > Thanks!- Hide quoted text -
>>
>> - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
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