Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieve multiple images from web source with one http request for android app

Tags:

java

android

I am attempting to build an android app and in that app I have a list view, which I would like to have thumbnail images in. The images are stored on a server, and they are all in the same folder (e.g. http://myserverlocation.com/images/dining/myImage1.jpg,myImage2.jpg, etc). What I want to know, is if there is an easy way to get all the images (approx 25) using ONE http request, or connection. What I want to avoid is making 25 http requests, one for each image, to get all the thumbnails. I'm familiar with AsyncTask, and BitMap, but I haven't seen anything on this site (or the internet) that talks about getting multiple images with one call. I was hoping someone here would have an answer for me, as to whether or not this is possible. I'm open to any suggestions on how I might be able to accomplish this task, without using all the phones resources and/or memory.

Thank you!

like image 228
BlackHatSamurai Avatar asked May 25 '26 22:05

BlackHatSamurai


1 Answers

If you are controlling the web service, I would highly recommended storing a zip file and retrieving that. I believe that Android likes to play with bzip, but that may be wrong. Either way, I remember reading on the Android Dev site or watching a Google IO talk and they suggested to zip it before you ship it.

like image 192
Frank Sposaro Avatar answered May 27 '26 10:05

Frank Sposaro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!