Chapter 4. Connecting the user interface with networking

In this chapter

  • Using events as a trigger for data retrieval
  • Taking a deeper look into how subscriptions work
  • Making cascading network requests

Subscriptions explained

In this chapter you’ll connect some dots and make data streams that start from the UI, trigger network requests, and end up being displayed to the user. Before you start, though, you’ll have a quick look at subscriptions in RxJava programming.

We’ve talked about subscribing, but not so much about subscriptions. In short, the subscribe function returns a Disposable object that allows us to manage the created relationship between the observable and the subscriber. Us in this context is the creator of the logic—the observables ...

Get RxJava for Android Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.