Search code examples
androidretrofitrobospice

Robospice+retrofit sequence of actions in background


I need to execute some requests, each request is followed by another request, eg:

When I invoke request B I need data received from request A response, when request C is invoked it needs data received from request B response and so on.

All my requests are user independent, magic should happen in background and result should be saved in database. I want to launch my request sequence from activity A and let user use app. I have 2 activity and some fragments so user can move freely around them.

So my question is: where should I handle my requests (where to create them, where to keep logic of RequestListener). Should I make service for my requests which have its own SpiceManager or maybe i can handle requests/response in my RetrofitSpiceService?


Solution

  • Seems like I have answer.

    I got rid of Robospice and I'm executing request synchronously in IntentService.