just a quick question (I think this is more of a design question than actually programming) I am looking for a way to do Multiple API calls in an IntentService or a Service giving that the result from one call is being used in another. I thought of having different AsyncTask for each different call but am not if this is an efficient method. Or is it possible to just make the call in the Service without the AsyncTask?.. Any feedback and any other better solution will be greatly appreciated. Thank you.

有帮助吗?

解决方案

I think in two diferentes ways, but depends your application, asyntask(you mentioned) or Android asynchttp.

http://loopj.com/android-async-http/

But i repeat, depends your project maybe we need more information to extends the answer.

其他提示

Now we have rxJava to help us. I had same requirement in one of my project and used rxJava for that. I have created 2 diff observers one was returning some list which I was passing to second one which was fetching details of each item in the list.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top