Android uses MIME types for this.  Do not use extensions.  Use MIME types.

On Sun, Mar 20, 2011 at 3:17 AM, Akshay Goel <xpectro...@gmail.com> wrote:

> Hello,
>
> I am trying to register file extensions with my application, so that
> the app menu-item appears when the file is shared (not opened). Also,
> I want to register for file extensions and not MIME types. To
> accomplish this, I added the following code to the manifest-
>
> <intent-filter>
>                <action android:name="android.intent.action.SEND" />
>                <category
> android:name="android.intent.category.DEFAULT" />
>                <data android:scheme="file" android:host="*"
> android:pathPattern=".*\\.pdf" android:mimeType="*/*"/>
> </intent-filter>
>
> In this case, I would like my app to be an option when a PDF file is
> shared (via the send/share menu). But this does not work and my app
> icon does not show up. However, if I simply replace SEND by VIEW in
> the code above, my app does get registered to handle the open intent
> (why this difference in behavior between SEND and VIEW?).
>
> Any pointers on how to resolve this shall be really appreciated.
>
> Thanks,
> Akshay
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to