Hey!! You were totally right! Seeing that it should work as you said,
I thought of other possibilities, and the REAL problem is that I had
some wrong attributes in the intent-filter section of my
manifest.xml.
I put only these lines, and it worked like a charm:

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
  </intent-filter>

Thanks a lot!!!

On 4 sep, 22:01, Jason Proctor <[email protected]> wrote:
> i do exactly this and i get the URI as such --
>
> Uri contentURI = (Uri) extras.get ("android.intent.extra.STREAM");
>
> works reliably for me.
>
> hth
>
>
>
>
>
> >Hello, I hope you will read this question, because this problem is
> >driving me crazy:
>
> >It's about the Gallery application. I've registered my application as
> >a target for the "Share" option where the selected picture is being
> >sent to another Activity in order to share it. The default application
> >in the emulator was Messaging, and the image is attached using this
> >option. Well, now I've got my application and Android asks me which
> >application should it use to complete the action. I select my
> >application and it opens the correct Activity, but... how can I get
> >the image?
>
> >My code (that doesn't work) is as follows:
>
> >            Intent i=getIntent();
> >            Bundle extras=i.getExtras();
> >            Uri uri = (Uri) extras.getParcelable(Intent.EXTRA_STREAM);
>
> >            AddImageFromUri(uri);
>
> >    While debugging, the intent and the bundle .toString() methods give
> >the following results:
> >i -> Intent { action=android.intent.action.CHOOSER flags=0x3800000
> >comp={com.superjmn.app.onblog/com.superjmn.blog.EditEntryActivity}
> >(has extras) }
> >extras -> Bundle[mParcelledData.dataSize=636]
>
> >But with this, uri is null. I've tried myriads of combinations, but
> >none works.
>
> >Please, help me. Thanks a lot!
>
> --
> jason.vp.engineering.particle
--~--~---------~--~----~------------~-------~--~----~
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