Android Browser File Types
From Android Wiki
So far there are reports that specific types of files fail to download on the Android browser. Here is a list of known file types:
- .zip - fails Note:1: The content being downloaded is not supported by the phone
- .xxx - works Note:2: Most .zip files on this site that should be downloaded via G1 have this extensions with instructions on renaming
- .xxx gets renamed to .asc when downloaded via the browser.
- while .zip results in the "content not supported" message, .ZIP (upper-case) does work (tested on Android 2.1, Moto Defy)
An application has been added to the market that will allow you to download any file. I have tested it with a .zip file and it worked great. The app name is Download Crutch. Find it on the market if you need to download any non working file extension.
Astro File Manager
In addition to Download Crutch, there is another free market app that addresses this issue. Astro file manager will enable the browser to download all file types. Astro is one of the highest rated and most popular file managers in the Android Market. To allow the browser to download all file types using Astro, download and open Astro File Manager. Then press menu, select more, then at the bottom of the list select the box marked Enable All File Types in Browser. In my experience, Astro is a good way to solve this issue as it is a very good file manager in addition to enhancing the browsers functionality.
If you are writing a web application that creates downloadable content, watch your HTTP headers to make your downloads work on all (and especially older) Android versions as expected:
- set the ContentType to application/octet-stream
- put the Content-Disposition filename value in double quotes
- if your file is a ZIP: write the Content-Disposition filename extension in UPPERCASE
For examples and details see this blog posting.