O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing Custom Observables

In this chapter, we will enhance the stock monitoring application with an ability to fetch updates about certain companies from a Twitter stream using the Twitter4J library.

However, in order to do that, we will need to learn how to plug non-reactive code into RxJava. There are a few ways to wrap plain Java code and turn it into an Observable. We will see how to do this using Java's Futures and Callables, and we will explore how Emitter interface can be used to work with hot Observables.

Finally, we will adapt the Twitter4J library into our Reactive workflow, and we will show updates related to the followed companies on the UI.

Topics covered in this chapter are as follows:

  • How to create Observables using standard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required