Summary

In this chapter, we learned about Subjects and how they can be an Observable and a Subscriber at the same time. We covered multiple types of Subjects, such as the following:

  • PublishSubject
  • BehaviorSubject
  • ReplaySubject
  • AsyncSubject

We saw how they are different and that they have different use cases. Furthermore, we examined how they work by running through multiple examples that emphasize their uniqueness.

Next, we learned about the RxPreferences library and how it can be combined with BehaviorSubject to provide us with a reactive interface to the application settings.

Using the RxPreferences library, we connected a UI that used PreferencesFragment so that the changes will automatically propagate to the main financial stock retrieval flow right at the moment they are made.

Finally, we saw how easy it is to plugin reactive preference management into the existing data retrieval flow using .switchMap().

In the next chapter, we will cover marble diagrams and how to read them. They are used extensively in the documentation and can help a lot when one is learning new operators.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.123.155