prashanth
prashanth

Reputation: 161

Storage of Images in DB as URL or blob for android app

I have large amount of pictures in server and need to show up in android app as list view. I tried storing just Url in db, but while retrieving from server it gives an error because of using more number of async task. Any suggestion with regard to this, As it would be useless if i store so many images and if i dont do that, its affecting user experience.

Upvotes: 0

Views: 285

Answers (2)

A Random Android Dev
A Random Android Dev

Reputation: 2691

Are you making use of lazy-loading? Whenever you need to load a large, indeterminate number of images it's commonly advised to use lazy loading to both improve user-experience and to solve memory management issues.

Read/watch the following links:

Lazy load of images in ListView

http://www.youtube.com/watch?v=gbQb1PVjfqM

Upvotes: 0

Ted Hopp
Ted Hopp

Reputation: 234807

You should not fire up a separate AsyncTask for each image. I suggest that you use a single AsyncTask to retrieve all images, one (or a few) at a time. As each image is received, the AsyncTask can use publishProgress (you will need to override onProgressUpdate) to display it in the UI.

Upvotes: 1

Related Questions