I'd like to replicate a simple task that is commonly used with handler using pure RxJava. I have spent quite a lot of time trying but I could not find a solution.
private final Handler handler = new Handler()
@Override
public void onEvent(EventType type) {
handler.removeCallbacksAndMessages(null);
if(type == EventType.CONDITION_1){
startTask();
} else {
handler.postDelayed(() -> startTask(), 1000);
}
}