0

I have an homepage in my app android

This homepage needs information from an external database
I thought in first place to use ASyncTask to load m information, but I think it's not best solution
because I have 2 ListView
First ListView (that has always 2 childs) queries an external database for previous information, and after that needs to load from web Image to load in an ImageView

Second ListView (3 childs) needs only one query to have all information to load data..

but now, how can I achieve this?
ASyncTask can run just for first information, can't it?
There's another way to load all information?

Tizianoreica
  • 2,142
  • 3
  • 28
  • 43
  • What exactly is the problem with AsyncTask? Cna't you define two different AsyncTasks? publishProgress() and onProgressUpdate() may be of any help? – type-a1pha Jul 23 '13 at 19:20
  • is not a problem? I think i should use at least 4 ASyncTask because, in first Task I need to query DB and retry path of my 2 Image, second Task to load First Image, Third Image load Second Image and last Task to query again server – Tizianoreica Jul 24 '13 at 07:07
  • you can have as many AsyncTasks as you want (not really) but they may execute sequentially depending on the version of your system. You can also try using a Looper with a Handler or your own ThreadPool. – type-a1pha Jul 24 '13 at 10:05

0 Answers0