When to use RxJava in Android and when to use LiveData from Android Architectural Components?

I am not getting the reason to use RxJava in Android and LiveData from Android Architectural Components.It would be really helpful if the usecases and differences between the both are explained along with sample example in the form of code which explains the differences between the both. 9 Answers 9

Use cases for RxJava schedulers

In RxJava there are 5 different schedulers to choose from: immediate(): Creates and returns a Scheduler that executes work immediately on the current thread. trampoline(): Creates and returns a Scheduler that queues work on the current thread to be executed after the current work completes. newThread(): Creates and returns a Scheduler that creates a new … Read more