ursus
05/05/2019, 5:17 PMdarkmoon_uk
05/06/2019, 12:36 AM.connect()
and not .autoConnect()
. autoConnect()
only subscribes to an up-stream ConnectableObservable
when one or more down-stream Observers have subscribed. It sounds like you want an immediate, unconditional subscription, so just do connect()
. This effectively is making a subscription with a subscriber which does nothing (when there are no other down-stream subscribers). Ensure to hold a reference to the returned Disposable
and .dispose()
it in an appropriate life-cycle callback.ursus
05/06/2019, 1:46 PMursus
05/06/2019, 1:49 PMursus
05/06/2019, 1:50 PM