Android AsyncTask inside AsyncTask

前端 未结 3 752
野趣味
野趣味 2020-12-18 05:44

So, I\'m working on a barcode decoder, which once we have the barcode goes to multiples API over the internet to decode what was just scanned. The thing is that I have to li

3条回答
  •  粉色の甜心
    2020-12-18 05:57

    In situations like this it might be better to batch long running operations together in one AsyncTask.

    Another option is to use the Loaders API, this makes chaining tasks much easier http://developer.android.com/guide/topics/fundamentals/loaders.html

提交回复
热议问题