Use RxAndroid or RxKotlin when programming in Kotlin for Android?

Damian Petla picture Damian Petla · Nov 17, 2014 · Viewed 10.8k times · Source

I am going to start using reactive programming in my Android project. I am using Kotlin as primary language and now I would like to apply Rx. My first choice was RxAndroid but then I noticed that there is RxKotlin.

As far as I know both are forked from RxJava so RxAndroid probably provides some API for android common tasks. On the other hand RxKotlin support lambas out of the box and allow me avoiding mixing kotlin with java.

Which one is preferred library in that case?

Answer

Stepango picture Stepango · Nov 17, 2014

You could use both of them. RxKotlin contains an extension functions that provides to you idiomatic way(with writing less code) of using rxJava in Kotlin. rxAndroid(is now split in few libraries) provides specific platform bindings such as:

There are few more useful libraries for rxJava and Android you could be interested.

Edited 01.04.16