December 2017
Intermediate to advanced
322 pages
7h 3m
English
So far, in this chapter, we've dealt with Cold Observables. What if we want to deal with hot source? Every type of Observable has their counterpart in Flowable. In the previous chapter, we started hot source with ConnectableObservable, so let's start with ConnectableFlowable.
As with Observable, ConnectableFlowable resembles an ordinary Flowable, except that it does not begin emitting items when it is subscribed, but only when its connect() method is called. In this way, you can wait for all intended Subscribers to Flowable.subscribe(), before Flowable begins emitting items. Please refer to the following code:
fun main(args: Array<String>) {
val connectableFlowable = listOf ("String 1","String 2","String 3","String 4", ...Read now
Unlock full access