RxJava Tutorial

Authors
  • Amit Shekhar
    Name
    Amit Shekhar
    Published on
RxJava Tutorial

I am Amit Shekhar, Co-Founder @ Outcome School, I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.

Join Outcome School and get high paying tech job: Outcome School

Before we start, I would like to mention that, I have released a video playlist to help you crack the Android Interview: Check out Android Interview Questions and Answers.

This blog is about the complete resources to learn RxJava in one place. These RxJava tutorials will help you in learning RxJava properly.

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 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 tutorials available to learn RxJava in the best possible way.

Types Of Observables In RxJava

In this tutorial, we will learn about the different types Of Observables in RxJava. Learning about all these types is important to use them effectively.

Link to the tutorial: Types Of Observables In RxJava

RxJava Create and fromCallable Operator

In this tutorial, we are going to learn about 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.

Link to the tutorial: RxJava Create and fromCallable Operator

RxJava Concat Operator

In this tutorial, we will learn about the Concat operator of RxJava.

Link to the tutorial: RxJava Concat Operator

RxJava Merge Operator

In this tutorial, we will learn about the Merge operator of RxJava.

Link to the tutorial: RxJava Merge Operator

RxJava Zip Operator

In this tutorial, we will learn the RxJava Zip Operator with an example. Most of the time while Android App Development, we get the use-case of doing some operations in parallel and return the return when all are completed. The Zip Operator is very handy here.

Link to the tutorial: RxJava Zip Operator

RxJava Operator Map vs FlatMap

In this tutorial, we will learn about the Map vs FlatMap Operator in RxJava.

Link to the tutorial: RxJava Operator Map vs FlatMap

RxJava Interval Operator

In this tutorial, we will learn about the Interval Operator of RxJava.

RxJava has operators for every use case. One of the very useful operators of RxJava is Interval Operator.

Link to the tutorial: RxJava Interval Operator

RxJava Defer Operator

In this tutorial, we will learn about the Defer operator of RxJava. 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.

Link to the tutorial: RxJava Defer Operator

RxJava Subject

In this tutorial, we will learn about the RxJava Subject - Publish, Replay, Behavior, and Async.

Link to the tutorial: RxJava Subject - Publish, Replay, Behavior, and Async

Instant Search Using RxJava Operators

In this tutorial, we will learn how to implement the instant search feature using RxJava operators in Android applications.

Implementing the search is a common use-case in Android Apps Development. We can implement it very easily using RxJava Operators.

Here, we have covered the operators such as filter, debounce, distinctUntilChanged, switchMap.

Link to the tutorial: Instant Search Using RxJava Operators

Pagination In RecyclerView Using RxJava Operators

In this tutorial, we will learn how to implement pagination in RecyclerView using RxJava operators.

Link to the tutorial: Pagination In RecyclerView Using RxJava Operators

dispose vs clear CompositeDisposable RxJava

In this blog, we will learn about the dispose method and the clear method of CompositeDisposable that is present in the RxJava.

Link to the tutorial: dispose vs clear CompositeDisposable RxJava

RxJava Operators By Examples

While working on Android Project, I have implemented many things using RxJava Operators very easily which would have been very difficult without the use of RxJava Operators. I must say RxJava operators have always been a good friend of mine.

I believe the best way to learn the RxJava Operators is to learn them by examples. I have created many tutorials for learning RxJava. Here, I have gathered some great examples to learn from them.

Link to the project to learn: RxJava2-Android-Samples

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

Prepare yourself for Android Interview: Android Interview Questions

That's it for now.

Thanks

Amit Shekhar
Co-Founder @ Outcome School

You can connect with me on:

Follow Outcome School on:

Read all of our high-quality blogs here.