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

2010-06-06 Thread jdeslip
Thanks,

Ya, I figured application/emx* would not match anything; but I was
grasping at straws.  The server side of things is not in my control.
I have to deal with the .emx files being downloaded with empty
mimetype - or give up the enterprise entirely.  :/

Usining mimetype=applcation/*  is the only thing so far that allows
me to download these .emx files in the browser and then open them from
the downloads screen.  Why does the browsers' download screen not
recognize the path based associations like the various file managers
do?  Is there a scheme I am missing for the browser?

-Jack

On Jun 5, 11:02 pm, Dianne Hackborn hack...@android.com wrote:
 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 jdes...@gmail.com 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 ?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+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@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


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

2010-06-06 Thread Yahel
 Ya, I figured application/emx* would not match anything; but I was
 grasping at straws.  The server side of things is not in my control.
 I have to deal with the .emx files being downloaded with empty
 mimetype - or give up the enterprise entirely.  :/

Is working with a WebView compatible with your spec ?
That is could your application be the browser to the emx file ?

Because then I'm note sure how, but you can change pretty much
everything that is coming from the server using webviewclient, a
downloadlistener or WhatNot from the WebKit component.

Yahel

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


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

2010-06-05 Thread jdeslip
Further info, I tried adding the following to 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:scheme=http android:host=*
android:pathPattern=.*\\.emx.*/
data android:scheme=https android:host=*
android:pathPattern=.*\\.emx/
data android:scheme=content android:host=*
android:pathPattern=.*\\.emx/
data android:scheme=file android:host=*
android:pathPattern=.*\\.emx/
/intent-filter

Now, in astro, OI-Filemanager my app is associated with .emx files.
But, in the Browser downloads screen, my app is still not associated
with .emx files.

So, my new question is this, what do I need to do to get .emx files
associated with my app in the Browser downloads screen.

-Jack

On Jun 5, 6:41 pm, jdeslip jdes...@gmail.com 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 ?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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en