[android-developers] Associate my app with file format

2010-06-05 Thread jdeslip
I am writing an app that needs to be able to open (be associated in
the browser download window for example) with a certain file type.
The file type has .emx extension and is in an xml format (the top of
the files have  ).  However, I
can't for the life of me get my app associated with this filetype.  I
have tried the following in my Manifest:


   

   
   
   
   
   
   
   
   
   


with no luck.  I can get the filetype associated properly with my app
if I do the following:


   

   
   


but this also associates my app with every file format (which I
obviously don't want though I see that snesnoid does this for
example).  Does anyone know how I can associate my app with this .emx
file format alone?

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


Re: [android-developers] Associate my app with file format

2010-06-05 Thread Dianne Hackborn
We generally don't do matching based on extension, but on MIME type.
 Ideally you want your server to reporting a proper MIME type for your file.

Also, the MIME type matches only handles '*' for type and subtype -- that
is, application/* or */*.  Your 'application/emx*' will not match anything.

On Sat, Jun 5, 2010 at 6:41 PM, jdeslip  wrote:

> I am writing an app that needs to be able to open (be associated in
> the browser download window for example) with a certain file type.
> The file type has .emx extension and is in an xml format (the top of
> the files have  ).  However, I
> can't for the life of me get my app associated with this filetype.  I
> have tried the following in my Manifest:
>
>
>   
> android:name="android.intent.category.DEFAULT" />
>android:name="android.intent.category.BROWSABLE" />
>   
>   
>   
>   
>   
>   
>   
>   
>
>
> with no luck.  I can get the filetype associated properly with my app
> if I do the following:
>
>
>   
> android:name="android.intent.category.DEFAULT" />
>android:name="android.intent.category.BROWSABLE" />
>   
>
>
> but this also associates my app with every file format (which I
> obviously don't want though I see that snesnoid does this for
> example).  Does anyone know how I can associate my app with this .emx
> file format alone?
>
> --
> 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