views:

363

answers:

2

I have a drupal-based website where people can log in and see private discussion forums. This is where I want to have my beta testers for my Android application download the beta .apk files. I tested this thoroughly on my Android 1.6 based myTouch 3G, and was able to log in, and download files attached to forum posts without problems.

Now comes the interesting part: my testers on Droids and Nexus Ones (Android 2.0.1 and 2.1) were complaining that their downloads are failing. Since I don't have an 2.0 phone, I tried it out in a 2.0 emulator, and lo-and-behold, it didn't work. The download shows the indeterminate progress for a second or two, then shows "Download unsuccessful".

Based on what I see in the logs, it is apparent that the server is returning a 404 for the download request from 2.0 browsers. I can download to my desktop and 1.6 phone no problem. The only reason I can think of that the server would return a 404 for a request is that for some reason the credentials or cookies aren't being passed by the download process. Logcat shows: http error 404 for download x

Some background: I added the mime type to my .htaccess like this: AddType application/vnd.android.package-archive apk

I checked the server logs and see the following for failed downloads: xx.xx.xx.224 - - [28/Jan/2010:20:39:00 -0500] "GET /system/files/grandmajong-beta090.apk HTTP/1.1" 404 - "http://trickybits.com/forums/beta-testing/grandma-jong/latest-version-090-b1" "Mozilla/5.0 (Linux; U; Android 1.6; en-us; sdk Build/Donut) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1"

A: 

The default storage location for drupal files is /sites/default/files. If you uploaded the file via Drupal (as a node or whatever) it will be here. You should also check out the file /sites/settings.php or your file uploads settings (http:///admin/settings/file-system) to see where your files are being stored.

This is not a MIME type issue, so remove the entry for the apk files unless you want the server to attempt to read them.

Andrew Sledge
Thanks sledge. Yeah, the file is definitely there, I can download it on my desktop via Firefox no problem. The issue seems to be between my website and certain versions of the Android browser and its download functionality.
ggrell
A: 

Are the apk's signed? Maybe the later versions of Android expect only signed apps. http://tordtech.blogspot.com/2009/10/signing-android-applications.html

Mondain
Down-vote but no comment, so you're sure that I'm wrong?
Mondain

related questions