Unable to download apk artifacts with Android device

I'm currently trying to set up an Android project in TeamCIty. The build works and produces apk files, but so far I've been unable to download them directly to a device.
I've tried various download links link /repository/download/..., /guestAuth/repository/download/..., /httpAuth/repository/download/..., etc. They all work with a regular web browser, but when I try to open them with Android's browser (or the alternative dolphin browser) the download doesn't even start. I've also configured tomca's MIME types, to send application/vnd.android.package-archive for the apk, but without any success.

If I copy the generated apk to a regular web server, the Android browser can download them without problems.

Has anybody seen similar problems, or has anyone been successful in dowloading apk artifacts?

Thanks for your help.

Comment actions Permalink

just to test if the problem is with the tomcat that's running our TeamCity server, I've simply copied the apk from /guestAuth/repository/download/bt9/.lastSuccessful/ into the ROOT webapp and tried to download from there. Works perfectly well.
So it seems the problem is with the way TeamCity serves artifacts.

Comment actions Permalink

Hi Markus

TeamCity needs to use a special HTTP headers (Content-Disposition) to serve artifacts.
And it looks like Android browser does not support it correctly.

A workaround is to use "Save link" action from link's context menu.



Please sign in to leave a comment.