Chapter 1: Observable
In this chapter we create Observables in a simple way.
By the way the rule to observe them is:
But let’s first create an observable that we could later observe…
Your just need to provide a lambda where the parameter is the emiter and call onNext or onComplete on it:
Your just need to provide the element or the list of elements to emit:
Your just need to provide the list of elements to emit:
More on the topic
Next chapter: Chapter 2 : Observers
This chapter is a small part of a biggest training project, you can find on Github. You’ll have the main branch with the answers/responses/unit tests and documentation. You could start with the “questions” branch to only have the questions.
You’ll have the full table of content of the articles on Medium.
You can download the book on Android2ee
Warning: Those articles has been created only because I am stuck in a Rx Android project and I need to prepare the ramp up for those who will replace me.
My conclusion : Choose Kotlin and suspending function instead of Rx. PLEASE, save your project from RxHell !!!
Write Medium in Markdown? Try Markdium!