A Complete Guide To Learn RxJava

A Complete Resources and Tutorials To Learn RxJava At One Place.

What is RxJava?

RxJava is used for reactive programming. In reactive programming, the consumer reacts to the data as it comes in. Reactive programming allows for event changes to propagate to registered observers.

As we know that the RxJava is the most important library for Android Projects. So we must have a proper grip on using RxJava in the Android Projects.

I believe that:

RxJava is an art and endless possibilities await those who can master it.

Let’s see all the best resources available to learn RxJava in the best possible way.

Get Started with RxJava

RxJava is a Java VM implementation of Reactive Extensions. It has become the single most important skill for Android development.

Get started from here.

Learn RxJava By Examples

Because Learning by example is the best way to learn.

Links to learn all the below mentioned operators by examples:

Here, you will learn about all the operators of RxJava by examples and real use-cases in Android Development.

  • Map: transform the items emitted by an Observable by applying a function to each item
  • Zip: combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this function
  • Filter: emit only those items from an Observable that pass a predicate test
  • FlatMap: transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable
  • Take: emit only the first n items emitted by an Observable
  • Reduce: apply a function to each item emitted by an Observable, sequentially, and emit the final value
  • Skip: suppress the first n items emitted by an Observable
  • Buffer: periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a time
  • Concat: emit the emissions from two or more Observables without interleaving them
  • Replay: ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting items
  • Merge: combine multiple Observables into one by merging their emissions
  • SwitchMap: transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable

Learn about RxJava Operator - Map Vs FlatMap

FlatMap & Map are very important operators in RxJava. Let’s learn how they are different and how to choose when to use which one.

Learn from here.

Learn about RxJava Operator - Concat Vs Merge

Concat & Merge are other important operators in RxJava. Let’s learn how they are different and how to choose when to use which one.

Learn from here.

Understanding RxJava Zip Operator With Example

Zip operator allows us to get the results from multiple observables at a time. This operator helps you to run all the tasks in parallel and returns the results of all the tasks in a single callback when all the tasks are completed.

Learn from here.

Understanding RxJava Timer, Delay, and Interval Operators

Operators like Timer, delay & Interval are very useful to solve specific problems. Let’s learn when to use which one.

Learn from here.

Understanding Types Of Observables In RxJava

All about the different types of Observables available in RxJava. Learning about all these types is important to use them effectively.

Learn from here.

Understanding RxJava Subject — Publish, Replay, Behavior and Async Subject

Learn about the Subject available in RxJava. These are useful to solve some typical use-cases in Android Development.

Learn from here.

How to implement caching using RxJava Operators

Caching is very useful in the following situations:

  • Reduce network calls: We can reduce the network calls by caching the network response.
  • Fetch the data very fast: We can fetch the data very fast if it is cached.

Let’s learn how to implement caching in Android using the following RxJava Operators:

  • Concat Operator
  • FirstElement Operator

Learn from here.

Implement Search Using RxJava Operators

Nowadays, most of the applications that we use in our daily life come with a search feature which provides us a facility to get things very quickly we are looking for. So, having a search feature is very important. And, we as a developer have a responsibility to implement it in a better way. The solution uses the following operators:

  • Filter Operator
  • Debounce Operator
  • DistinctUntilChanged Operator
  • SwitchMap Operator

We will learn all the above four RxJava Operators.

Learn from here.

Understanding RxJava Defer Operator

In this blog, we are going to learn the RxJava Defer Operator. We will understand when to use the Defer operator depending on our use-case. Most of the time, we do mistakes while using the RxJava Defer Operator. Let's understand it clearly to avoid the mistake.

Learn from here.

Understanding RxJava Create and fromCallable Operator

In this blog, we are going to learn the RxJava Create and fromCallable Operators. We will understand when to use the Create operator and when to use the fromCallable operator depending on our use-case. Most of the time, we do mistakes while using RxJava Operators. Let's understand it clearly to avoid the mistake.

Learn from here.

Implement Pagination In RecyclerView Using RxJava Operators

Nowadays, most of the applications that we use in our daily life come with the scrolling feature. They fetch data as we scroll down more from the data sources like network, database, and etc. They load the data on demand. As we scroll down it loads more data. So, pagination becomes important.

Learn from here.

Know about RxAndroid

RxAndroid is an extension of RxJava for Android which is used only in Android application.

Learn from here.

Error Handling in RxJava

In this blog, we will learn how to handle errors in RxJava. We would be understanding various ways to handle the error and will also see a real-life example for better understanding.

Learn from here.

With great power, comes great responsibility. So learn it in the best way.

Happy Coding :)

Also, Let’s become friends on Twitter, Linkedin, Github, Quora, and Facebook.