Skip to content

ravi8x/RxAndroidExamples

Repository files navigation

Intro

The aim of this course is to teach fundamental concepts of RxJava and RxAndroid and take you from a novice to intermediate RxJava developer.

Head on to https://www.androidhive.info/RxJava for detailed explanation of RxJava modules.

Basics

  • Example1Activity - Basic Observable, Observer and Subscription example. Emitting list of animal names.
  • Example2Activity - Introduced Disposable to dispose the subscription.
  • Example3Activity - Introducing filter() operator to filter out the animal names starting with letter b.
  • Example4Activity - Example of chaining of operators. map() and filter() operators are used together.
  • Example5Activity - Introduced CompositeDisposable and DisposableObserver. Also custom data type Note is used in this example.

Operators

Read the Introduction to RxJava Operators to get started with RxJava operators.

  • JustOperator - Creating an Observable using just operator.
  • FromOperator - Creating an Observable using from operator.
  • RangeOperator - Creating an Observable using range operator.
  • BufferOperator - Buffer emits data into batches instead of emitting one at a time. Calculating number of taps in certain period is explained in the example.
  • DebounceOperator - Debounce operators emits items only when a specified timespan is passed. An example of taking search query is explained.
  • FilterOperator - filter allows the Observable to emit the only values those passes a test.
  • RepeatOperator - Creates an Observable that emits an item or series of items repeatedly.
  • SkipOperator - skip(n) operator skips the emission of first N items emitted by an Observable.
  • TakeOperator - take(n) takes first N emissions of an Observable.
  • DistinctOperator - Distinct operator filters out items emitted by an Observable by avoiding duplicate items in the list.
  • CountOperator - Counts number of items emitted by an Observable and emits only the count value.
  • ReduceOperator - Example of reduce operator. Applies a function to first item, takes the result and feeds back to same function on second item. This process continuous until the last emission. Once all the items are over, it emits the final result.
  • MaxOperator - Finds the maximum valued item in the Observable sequence and emits that value
  • MinOperator - Finds the minimum valued item in the Observable sequence and emits that value
  • SumOperator - Calculates the sum of all the items emitted by an Observable and emits only the Sum value.
  • AverageOperator - Calculates the average of all the items emitted by an Observable and emits only the Average value.
  • ConcatOperator - Concat operator combines output of two or more Observables into a single Observable. Maintains the order of execution.
  • MergeOperator - Merge also merges multiple Observables into a single Observable but it won’t maintain the sequential execution.
  • MapOperator - Map operator transform each item emitted by an Observable and emits the modified item.
  • FlatMapOperator - Example of FlatMap operator.
  • ConcatMapOperator - Example of ConcatMap operator.
  • SwitchMapOperator - Example of SwitchMap operator.
  • ZipOperator - Example of Zip operator.

Retrofit Networking

Android RxJava Networking with Retrofit, Gson RxJava networking using Retrofit library. An example of live Notes App is explained using Retrofit networking. Demo

Android Examples

Roadmap

  • RxBinding
  • RxJava Subjects
  • RxJava Event Bus
  • Understanding Marble Diagrams
  • Data Storage (SQLite, Room Persistence)
  • Flowable Backpressure Example
  • Hot vs Cold Observables
  • Side Effect Operators
  • Volley Networking
  • Form Validation
  • Rx Runtime Permissions
  • Timers & Intervals
  • Clean Architecture
  • MVP, MVVM Architecture
  • Complete RxJava Apps