Fix the Web server to not return #2. Android does not appear to
support that style of Content-Type header, mostly because it does not
seem to support Content-Disposition: attachment.

On Thu, Feb 10, 2011 at 3:13 PM, Pedro Duque <[email protected]> wrote:
> Hi,
>
> I'm juggling with MIME types and got to a dead end.
>
> I have a file with a non standard extension "dcp" and created a specific
> MIME type for it "application/vnd.portugalemgrande.clock". I've managed to
> make it work with email but my problem now is with webserver. If the server
> puts extra info in content-type my code doesn't work.
>
> Let me explain:
>
> INTENT FILTER:
>             <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:mimeType="application/vnd.portugalemgrande.clock" />
>             </intent-filter>
>
> WEB SERVER RESPONSE #1:
> HTTP/1.1 200 OK
> Date: Thu, 10 Feb 2011 19:57:18 GMT
> Server: Apache
> Last-Modified: Thu, 10 Feb 2011 19:55:31 GMT
> Accept-Ranges: bytes
> Content-Length: 1157
> Cache-Control: max-age=1209600
> Expires: Thu, 24 Feb 2011 19:57:18 GMT
> Keep-Alive: timeout=5, max=100
> Connection: Keep-Alive
> Content-Type: application/vnd.portugalemgrande.clock
> X-Antivirus: avast! 4
> X-Antivirus-Status: Clean
>
> WEB SERVER RESPONSE #2:
> HTTP/1.1 200 OK
> Date: Thu, 10 Feb 2011 19:57:24 GMT
> Server: Apache
> X-Powered-By: PHP/5.2.14
> Expires: Sun, 19 Nov 1978 05:00:00 GMT
> Etag: "1297367844"
> Content-Disposition: attachment; filename="clock12.dcp"
> Cache-Control: private
> Last-Modified: Thu, 10 Feb 2011 19:57:24 GMT
> Content-Length: 1157
> Keep-Alive: timeout=5, max=100
> Connection: Keep-Alive
> Content-Type: application/vnd.portugalemgrande.clock; name="clock12.dcp"
> X-Antivirus: avast! 4
> X-Antivirus-Status: Clean
>
> The intent filter catch response #1 but doesn't work with response #2
> although is a valid response.
>
> What should I do in intent filter to make it work in both cases?
>
> Thanks,
> Pedro Duque
>
> --
> 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

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