Slide 5
Slide 5 text
val source: Observable =
Observable.interval(1, TimeUnit.SECONDS)
source.subscribe { Log.v(TAG, "subscriber 1 : received event $it") }
subscriber 1 : received event 0
subscriber 2 : received event 0
subscriber 1 : received event 1
subscriber 2 : received event 1
subscriber 1 : received event 2
subscriber 2 : received event 2
subscriber 1 : received event 3
subscriber 2 : received event 3
subscriber 1 : received event 4
subscriber 2 : received event 4
source.subscribe { Log.v(TAG, "subscriber 2 : received event $it") }