RxJava for Android Developers cover
welcome to this free extract from
an online version of the Manning book.
to read more
or

About this book

published book

RxJava for Android is the book I wish I had when I started using the reactive paradigms on Android. RxJava is an incredibly powerful tool, and you will learn how to use it in a way that creates robust and sustainable code. You will understand the change of mental models compared to more traditional ways of programming and what that brings you.

Who should read this book

Reactive programming has become a tool that is used at least in some part of almost every Android application—and if not RxJava, then another reactive library. It is helpful for every Android developer to have a little deeper knowledge of reactive programming in case they encounter it.

You should have basic experience with the Android platform to get most out of this book, though you could also learn the basics of the platform from the samples as you go. Just keep in mind that with RxJava, you would do some things differently than on the vanilla Android, which is the whole point of this book!

How this book is organized: a roadmap

You’ll find this book divided into three parts. Part 1 introduces RxJava and lets you become familiar with the basics of using it on the Android platform.

  • Chapter 1 shows a quick win for RxJava in asynchronous event handling with the debounce operator.
  • Chapter 2 explores using RxJava for the basic networking needs of an Android app.
  • Chapter 3 outlines the difference between events and changing state and introduces data processing chains.
  • Chapter 4 shows you how to build a Flickr client by combining what you have learned so far.
  • Chapter 5 dives into custom observables and how to do efficient multithreading with RxJava by building a fully functioning file explorer app.

Part 2 is focused around view models and how to use them to refine your data streams.

  • Chapter 6 expands the file explorer app and improves the architecture by separating part of the business logic into a view model.
  • Chapter 7 further develops the file explorer app to add a model as the single source of data.
  • Chapter 8 explains the connection between a view and a view model with an example app of tic-tac-toe.
  • Chapter 9 adds a persisting model to the tic-tac-toe app.
  • Chapter 10 shows how you can unit test RxJava code and to add a few tests to the tic-tac-toe app as an illustration.

Part 3 takes a deep dive to more advanced examples of how RxJava can be used to architect your application.

  • Chapter 11 uses WebSockets with RxJava to build a live chat client app.
  • Chapter 12 adds a model to the chat client app to load existing messages and support messages that have not yet gone out.
  • Chapter 13 uses RxJava to create dynamic animations that promptly react to user interaction.
  • Chapter 14 finishes the book with an app that uses open source map tiles to create a draggable and zoomable map fully in RxJava.

About the code

This book contains many examples of source code in line with normal text. The source code is formatted in a fixed-width font like this to separate it from ordinary text.

In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. Additionally, comments in the source code have often been removed from the listings when the code is described in the text. Code annotations accompany many of the listings, highlighting important concepts.

All of the chapters of this book have full Android code examples online. The examples range from simple demos to more rounded apps.

The code for this book is available for download from the Manning website at https://www.manning.com/books/rxjava-for-android-developers and from GitHub at https://github.com/tehmou/RxJava-for-Android-Developers.

liveBook discussion forum

Purchase of RxJava for Android Developers includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum, go to https://livebook.manning.com/book/rx-java-for-android-developers/discussion. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/#!/discussion.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions lest his interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.

About the author

Timo Tuominen has used FRP and RxJava extensively as an architect of a major Android project for Samsung while working with Futurice. As a consultant, he has developed dozens of agile projects on almost all relevant platforms—and a number of dead ones—nowadays bringing FRP to wherever he can.

About the cover illustration

Jefferys

The figure on the cover of RxJava for Android Developers is captioned “Habit of an Arabian Woman in 1581.” The illustration is taken from Thomas Jefferys’ A Collection of the Dresses of Different Nations, Ancient and Modern (four volumes), London, published between 1757 and 1772. The title page states that these are hand-colored copperplate engravings, heightened with gum arabic.

Thomas Jefferys (1719–1771) was called “Geographer to King George III.” He was an English cartographer who was the leading map supplier of his day. He engraved and printed maps for government and other official bodies and produced a wide range of commercial maps and atlases, especially of North America. His work as a mapmaker sparked an interest in local dress customs of the lands he surveyed and mapped, which are brilliantly displayed in this collection. Fascination with faraway lands and travel for pleasure were relatively new phenomena in the late 18th century, and collections such as this one were popular, introducing both the tourist as well as the armchair traveler to the inhabitants of other countries.

The diversity of the drawings in Jefferys’ volumes speaks vividly of the uniqueness and individuality of the world’s nations some 200 years ago. Dress codes have changed since then, and the diversity by region and country, so rich at the time, has faded away. It’s now often hard to tell the inhabitants of one continent from another. Perhaps, trying to view it optimistically, we’ve traded a cultural and visual diversity for a more varied personal life—or a more varied and interesting intellectual and technical life.

At a time when it’s difficult to tell one computer book from another, Manning celebrates the inventiveness and initiative of the computer business with book covers based on the rich diversity of regional life of two centuries ago, brought back to life by Jeffreys’ pictures.

Get RxJava for Android Developers
buy ebook for  $35.99 $25.19
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage