tags:

views:

44

answers:

2

I've exported an apk from eclipse. I am able to install it without any problem if I copy it to the phone's sd card.

When trying to download via phone's (Galaxy S) browser I get: "Download unsuccessful".

I have set mime type application/vnd.android.package-archive in the mime.types, restarted apache, still same result. Also tried :

<a href="downloads/my_apk.apk" type="application/vnd.android.package-archive">Download App</a>

Still no luck.

I am able to download and install applications from android market. I suspect that apache is not sending the mime type but this is just a shot in the dark. How can I fix the problem and be able to install APKs from my web server? (or at least to check if apache sends correct header with mime type)

Any help will be appreciated.

+1  A: 

Use curl to test the Web server to make sure it is responding to the HTTP request and returning the proper MIME type. Also, example your server logs to see what error is being logged.

CommonsWare
A: 

After all I found the problem thanks in part to CommonsWare advise.

Directory where I put apks for downloads is protected by simpe auth. Phone's browser correctly asks (once) for username/password when browsing it but obviously forgets to send auth info when trying to download the file and that causes 401 Unauthorized.

Solution: remove basic auth from that dir or use another unprotected dir for the apks.

Ogre_BGR