PHP File Download from Android Application

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

PHP File Download from Android Application

Postby godroid » Thu Mar 22, 2012 6:24 pm

I'm trying to download a SQLite Database from a PHP Server, the Server Script looks like

Code: Select all
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=db_app");

When I try to download the file from a usual webbrowser everything is fine.

But when I try to download it from within my Android App I only get a file with a "0" in it and not the real content.

I use the source code from here.

I think the problem is that I am not directly downloading the file, instead I have to react on the HTTP Header information "Content-disposition: attachment; filename=db_app", does anyone know how to do this and download the file?
Once Poster
Once Poster
Posts: 1
Joined: Wed Feb 08, 2012 3:04 pm


Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 3 guests