i am new to RxJava. What I want to accomplish is search functionality, where every key press is a request. Also I want be able to call the request explicitly.
So I used
RxTextView.textChanges(editText)
.debounce
.flatmap(request)
for the first part. Everything works.
But when manually calling the request part, I got stuck. I can workaround it to implcitly trigger onTextChange by doing editText.setText(editText.getText) but that feels dirty.
I researched the topic and I found PublishSubject. I extracted the actuall request part in it and looks kinda like this
mPublishSubject.
.doOnNext(.. show progressbars..)
.flatMap(..request..)
.subscribe(.. display data...)
Is there a way I can join textChanges Observable and the request Subject? In other words, how can textChanges stream continue in search subject stream?. Other than calling mPublishSubject.onNext from text observables subscribers onNext.