Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RetrofitService.doTheThing(params) // Your typical API call
.subscribeOn(Schedulers.io()) // Execute API call on IO thread
.observeOn(AndroidSchedulers.mainThread()) // Execute observers on Android's main thread
.subscribe(results -> handle(results)); // Handling the results of the API call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment