0

I have problems while downloading images using HttpClient on Android. It seems like when the image is pushed from the server like "downloadable file" it does not work. On the other hand images displaying right in the browser downloads without any issues. It looks like problem with headers and mimetype of the files provided, or something like that..I thought it was problem with gzip enabled on the server, but after few experiments it definitely doesn't look so. Does anybody know how to solve that? Thanks

Here is brief snippet of my code

HttpClient httpClient = new DefaultHttpClient();
HttpResponse response = httpClient.execute(request);
HttpEntity entity = response.getEntity();
inputStream = entity.getContent();
Drawable image = Drawable.createFromStream(is, "src"); //the image is null in certain scenarios
4

1 に答える 1