https://kotlinlang.org logo
Title
u

ursus

04/14/2019, 3:29 AM
@william yes you can do it without subject, just create anonymous object : ConnectivityManager.NetworkCallback(), and then wrap it in Observable.create { emitter -> ... }
w

william

04/14/2019, 3:47 PM
sure that can be done but that doesn't really seem to gain anything - that just seems to be avoiding a subject for the sake of avoiding a subject
u

ursus

04/15/2019, 2:37 PM
Not really, I suggest you lookup use case and downsides of subject. Subjects are a bridge between imperative ansmd reactive, and they are hot and cannot dispose upstream. Which is precisely what you are gaining here