A project recently came across my desk to set up a web server for android application file distribution.
Setting up an IIS web server to distribute files is generally simple and straight forward. Though I recently discovered that with android its not that simple.
To handle .apk file types I created a MIME type map for android .apk ” application/vnd.android.package-archive”
This seemed to work and would server the .apk files for download via the android browser. However I found that android devices running 2.3.x would get an error “cannot download. This content is not supported by this device.” It appeared that it did not recognize this as a .apk file when it tried to download the file.
I found a work around by creating a generic MIME type handler “application/octet-Stream”:
Adding this MIME type seems to work great and is able to properly serve the files on all versions of android.