Tutorial by Examples

A Subject in RxJava is a class that is both an Observable and an Observer. This basically means that it can act as an Observable and pass inputs to subscribers and as an Observer to get inputs from another Observable. Subject<String, String> subject = PublishSubject.create(); subject.subscr...
PublishSubject emits to an Observer only those items that are emitted by the source Observable subsequent to the time of the subscription. A simple PublishSubject example: Observable<Long> clock = Observable.interval(500, TimeUnit.MILLISECONDS); Subject<Long, Long> subjectLong = Publi...

Page 1 of 1