Saturday, June 5, 2010

[android-developers] Associate my app with file format

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 <?xml version='1.0' encoding="UTF-8"?> ). However, I
can't for the life of me get my app associated with this filetype. I
have tried the following in my Manifest:

<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="application/xml"/>
<data android:mimeType="application/rss+xml"/>
<data android:mimeType="application/emx+xml"/>
<data android:mimeType="application/*xml"/>
<data android:mimeType="text/xml"/>
<data android:mimeType="application/emx"/>
<data android:mimeType="application/emx*"/>
<data android:mimeType="application/xml*"/>
</intent-filter>

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

<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="application/*"/>
</intent-filter>

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate