RxJava and RxAndroid complete beginner examples
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.
Observable
, Observer
and Subscription example. Emitting list of animal names.filter()
operator to filter out the animal names starting with letter b
.map()
and filter()
operators are used together.CompositeDisposable
and DisposableObserver
. Also custom data type Note
is used in this example.Read the Introduction to RxJava Operators to get started with RxJava operators.
just
operator.from
operator.range
operator.Buffer
emits data into batches instead of emitting one at a time. Calculating number of taps in certain period is explained in the example.Debounce
operators emits items only when a specified timespan is passed. An example of taking search query is explained.filter
allows the Observable to emit the only values those passes a test.skip(n)
operator skips the emission of first N items emitted by an Observable.take(n)
takes first N emissions of an Observable.Distinct
operator filters out items emitted by an Observable by avoiding duplicate items in the list.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.maximum
valued item in the Observable sequence and emits that valueminimum
valued item in the Observable sequence and emits that valueConcat
operator combines output of two or more Observables into a single Observable. Maintains the order of execution.Merge
also merges multiple Observables into a single Observable but it won’t maintain the sequential execution.Map
operator transform each item emitted by an Observable and emits the modified item.FlatMap
operator.ConcatMap
operator.SwitchMap
operator.Zip
operator.Android RxJava Networking with Retrofit, Gson RxJava networking using Retrofit library. An example of live Notes App is explained using Retrofit networking. Demo
Android RxJava Instant Search – Local, Remote Databases (Retrofit) Android example of adding instant search to a Contacts app. You will see a use case of Debounce, SwitchMap, Observables and Retrofit when put together.
Android Flight Ticket App – RxJava FlatMap (Retrofit) Android example of simple Flight Ticket price listing app. You will learn the use of FlatMap and ConcatMap operators when used with Retrofit networking calls.