Which approach is best to use if you need to perform several synchronous requests in a row (after receiving a response from the server, send the next request, etc.)? Moreover, the execution of these requests must be started when an event occurs, for example, pressing a button or receiving an Intent . What is best to use: Service , or a bunch of Thread - Looper - Handler , or something else?
- fourperfect - RxJava :) - Sviat Volkov
|
1 answer
The two simplest ways to implement this are:
1) RxJava + Retrofit
2) LiveData + Transformations (Android Architecture components) + LiveDataCallAdapter for Retrofit
|