RxJava for Android (100+ Examples Pack)
This repository is intended to provide in a single place (i.e. a single Android app) over than 100 examples of RxJava for Android which you can use as a reference when dealing with RxJava.
In order to make it easy to find the examples throughout the app, we divided them in different categories. They are:
- Operators Examples: Basically it contains examples of operators used to filtering, combining, transforming data, etc as well as some error handling examples.
- Backpressure Examples: Contain different approaches to deal with backpressure.
- Hot Observable Examples: Show how to use Hot Observables by using operators such as cache, replay, etc.
- Parallelization: Demonstrate how to do real parallelization using RxJava operators and schedulers.
- General Examples: Contain some examples that do not fit in any of the previous categories.
Some examples were already covered into details in one of the articles of our RxJava series (you can find the links below), while some other were based on external articles, so you can go directly to those articles and see the the authors' explanations.
It's worth mentioning whenever an example was based on an external article, we added a reference to the sources, so all the credits go to the authors.
You can find details about this repository here.
Here is a list of all covered examples on the demo app and the articles on which they were based:
-
Operators Examples
- Filtering Operators (12 examples)
- More about Filtering Operators (5 examples)
- Combining Observables (9 examples)
- Conditional Operators (10 examples)
- Transforming Operators (9 examples)
- Timeout Operator (7 examples)
- Mathematical and Aggregate Operators (7 examples)
- Join Operator (1 examples)
- Retry and RetryWhen (6 examples)
- ConcatMap and FlatMap (2 examples)
- Error Handling (5 examples)
-
Back Pressure Examples
- Backpressure (8 examples)
-
Hot Observable Examples
- Hot Observables` (6 examples)
-
Parallelization Examples
- Achiving Parallelization and Maximizing parallelization (8 examples)
-
General Examples
- Simulate Server Polling (4 examples) - This example is useful when we need to poll a server periodically until it finishes a certain task.
- Server Polling After Local Data Processing (3 examples) - This example is useful when we need to poll a server and process some data locally, and only after finish local processing, poll the server again.
- Typing Indicator (1 example)
- Drawing Example (1 example) - This example shows how to react to mouse events as well as listen for SeekBar and menu item click events by using RxBindings library.
- Broadcast System Status (1 example) - This example shows how to listen for broadcast system messages by using RxBroadcast library.
License
This project is licensed under the Apache-2.0 - see the LICENSE file for details