This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[url]https://newfivefour.com/android-rxjava-wait-for-network-calls-finish.html[/url] | |
Android, RxJava and Retrofit: Wait for multiple network calls to finish | |
Say you have multiple network calls you need to make–cals to get Github user information and Github user events for example. | |
And you want to wait for each to return before updating the UI. RxJava can help you here. | |
Let’s first define our Retrofit object to access Github’s API, then setup two observables for the two network requests above: |