Reactive Programming for Android
0.0 (0 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
10 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Reactive Programming for Android to your Wishlist.

Add to Wishlist

Reactive Programming for Android

Make the most of asynchronous android programming
0.0 (0 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
10 students enrolled
Created by Packt Publishing
Last updated 8/2017
Current price: $10 Original price: $125 Discount: 92% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 3.5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Set up an environment for asynchronous (that is, Reactive) Android programming
  • Write custom observables and higher-level abstractions
  • Orchestrate multiple calls using Reactive programming principles
  • Fetch remote financial data using RxJava
  • Integrate and process Twitter streams gracefully
  • Utilize Reactive programming to develop interactive and responsive Android apps
  • Create your own application to follow financial stock updates in real-time based on selected companies' symbols
  • Integrate updates from Twitter for those companies.
View Curriculum
  • For Android developer trying to figure out how to use the Reactive paradigm for your programming needs. No prior knowledge of RxJava is required
  • Specific Software's - Android studio version 2.3.3

Writing code on Android is hard. Writing high-quality code that involves concurrent and parallel tasks is even harder. Ensuring that this code will run without unforeseen race conditions is an order-of-magnitude harder. RxJava can help write code for such tasks.

In this course the novice developer will be introduced to a wide variety of tools that RxJava provides to enable them to produce robust and high-quality code for their asynchronous tasks by building a relatively simple application using advanced RxJava techniques to produce a high-quality product.

The starting sections will lead the developer through RxJava's initial setup in the Android environment. Later you will learn about RxJava 2.0 step-by-step by starting off with stock data processing and display. The developer will learn to choose appropriate Schedulers and to use the Retrofit library for remote requests. In the final sections, the viewer will also learn advanced topics such as adding integration to Twitter to process its streaming data by combining it with stock data.

About The Author

Tadas Subonis started coding when he was about thirteen. Since then, he has programmed with PHP, JavaScript, Python, C++, and Java (the language in which he has probably written the most code). He took up Android relatively recently, around 2014 (after a few false starts in 2012).

However, he soon learned that Android lacks decent support for asynchronous programming (Async Task was/is a joke) while more reckless languages, such as JavaScript, had had promises for a long time. Furthermore, Java's standard library lacked decent support for functional programming primitives (map, filter), but that was easily fixable with libraries such as Guava.

This led Tadas to a search for a library that would help him achieve a Promise-like functionality and interface. It didn't take him long to find ReactiveX and its family of implementations (including RxJava), which handles streams in a Reactive fashion. It didn't exactly offer the flow that Promise-like systems provide but, soon enough, he realized that it was even more powerful.

Since then, he has been using RxJava (and RxKotlin) for his daily Android programming. The quality of the code (the lack of bugs, readability, and maintainability) has improved ten-fold. Giving users of your application a fast, crash-free experience is a must these days when competition for user attention on app marketplaces is getting fiercer and fiercer.

Who is the target audience?
  • Are you an Android developer trying to figure out how to use the Reactive paradigm for your programming needs? If so. then this is the course for you.
Compare to Other RxJava Courses
Curriculum For This Course
41 Lectures
Building Our First RxJava Application
4 Lectures 14:52

This video gives an overview of the entire course.

Preview 04:14

 Before we can start the development, we need to prepare dependencies            


In this video, we will Create an initial UI where we will will be displaying changes of financial stocks over time and track stock updates.           

The Very First User Interface

New Java 8 features, such as lambdas and method references, are not available by default on the Android platform. So, this video shows you how to add some features of Java 8 using retrolambda.            

Using Retrolambda
Understanding the Basics of RxJava
4 Lectures 15:52

In this video, we are going to take a look at observables and explore how they are related to disposables. Moving on, we will learn about schedulers.       

Preview 06:09

 The logging inside the steps of an observable is a very powerful tool when one wants to understand how they work.            

Investigating the Flow of an Observable

 In this video, you are going learn flowables and how to use back pressuring with flowables.            


 In this video, we will learn about three more types that RxJava provides.            

Completable, Single, and Maybe Types
Learning to Use Retrofit by Fetching Financial Data
4 Lectures 12:26

In this video, you will learn how to set up necessary Retrofit dependencies and configure Retrofit interface objects to make simple HTTP GET requests.

Preview 04:55

The data that's returned by the API might not be readily usable as it is. Often, one needs to process the returned data to transform it into a more usable format.

Transforming Request Data

It wouldn't be a proper financial stocks monitor, if it is unable to get updates automatically. To get updates automatically from the Yahoo Finance data, we will use a polling mechanism

Regular Updates

Introduction of the regular updates of the stock quotes, generates lots of duplicate entries in the RecyclerView list. So, we will see lots of duplicate or rather irrelevant entries.

Handling Multiple Records on the UI
Integrating RxJava 1.0 with RxJava 2.0
2 Lectures 06:28

In this video, we will understand the differences between RxJava 1.0 and RxJava 2.0.

Preview 03:27

To make our lives easier, we will use another library that will help us connect old RxJava observables with the newer interfaces of RxJava 2.0.

Gluing Different RxJava Versions
Writing Data to SQLite and Schedulers
3 Lectures 19:51

There are a few types of schedulers and each of them is intended for a different type of work. Here, in this video , we will cover all of them

Preview 05:32

We will review the ways in which we can modify where the code gets executed

Using Schedulers

There are multiple ways to persist data locally for later consumption, but the most robust and convenient way on Android is the bundled SQLite database

Writing Data with StorIO
Error Handling and SQLite Data Reading
4 Lectures 19:38

It is important to gracefully inform the user about failures if they happen and, even more important, to not leave any loose exceptions so that they don't kill Android applications.

Preview 05:27

It's important to properly handle errors not only in the sense that they should be logged and shouldn't kill the app, but in the sense that the user should always be informed as to what happened.

Showing Errors in the Android UI

In this video, we will explore a few ways of implementing a centralized logging solution so that it's easy to maintain and use.

Centralized Error Logging

We can now start creating a flow that will load locally saved StockUpdate entries from the SQLite database in cases when the quotes cannot be fetched from the internet.

Reading SQLite Data with StorIO
Integrating RxJava with Activity Lifecycle
3 Lectures 23:43

Activities are the core components in Android to show the user interface. In most cases, all data processing, fetching, and any other action are tied to the activity.

Preview 06:22

If a proper lifecycle of the activity isn't maintained and one doesn't take care of cleaning up the resources, leaks will certainly happen

Resource Leaks

In this video, we will explore a few different ways to correctly destroy subscriptions

Cleaning up Subscriptions
Writing Custom Observables
2 Lectures 17:16

This video will show you that the creation of custom observables isn't complicated

Preview 05:29

Since we already know how to integrate any kind of Java code into the reactive flow, we are ready to start working with Twitter streams.

Reading Tweets for Stocks Reactively
Advanced Observable Flows Explained
4 Lectures 24:42

There is often a need to create and consume nested observables. In this video, we will see how to use .flatMap() in detail and how it works.

Preview 08:12

There will be a lot of cases where .map() is used, but we need to return the original value along with the new value.

Passing Values

It can so happen quite often that there is a need to execute two asynchronous tasks and wait for the result of both of them before the next step can be taken.

Combining Items

In this video, we will use .filter() to optimize certain parts of the application, and later, we will add notifications that will inform the user when a certain stock has dropped.

Higher Level Abstractions
7 Lectures 23:07

Extracting code into separate methods is a very simple yet super-effective technique to clarify the purpose of certain elements and make it easier to understand what is going on.

Preview 08:15

In the existing flow, we can see some spots where we can extract several code blocks in unison.

Using Transformations

ObservableTransformer is a simple interface that defines a transformation on the observable object as a whole instead of the individual items that the observable produces.

Simplifying Code with Transformations

We will see how we can move the extracted transformer to its own class that is to the persistence code, and we will explore a few additional examples for file-based caching and measuring the timing of the execution.

Creating Transformer Classes

Quite often, there is a need to cache some kind of results between the runs of the application. The most convenient way to do this on Android is through a basic file-based caching.

File-based Caching Example

Another useful example for the ObservableTransformer can be the tracking of the emission times of the items produced by the observable. In other words, how much times has passed since the start when this item was emitted.

Using Transformation to Track the Execution Time

One cool use case for transformations is to use them to print additional logging during the execution of the observable. This can be really useful when what's happening inside the observable flow is unclear.

Using Transformation to Debug Observables
1 More Section
About the Instructor
Packt Publishing
3.9 Average rating
8,229 Reviews
59,023 Students
687 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.