Android Multithreading: When to use RxJava and Coroutine

Use coroutine:

  • if the app runs network calls once or twice per activity creation
  • if the app needs to be simple and easily read by less experienced coders
  • if it is a multi platform project based on Kotlin Native

Use RxJava:

  • if the app runs any sort of real time feature
  • if the app needs high levels of data manipulation between fetching and emitting.

But keep in mind, it is possible to use both of them together, at least if the programming language is Kotlin.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store