Tagged: RxJava


.blockingGet & AndroidSchedulers.mainThread() make the app stuck

Recently, I had a very strange problem to debug. I had the following interactor: public class GetUserUpdatesInteractor { private final UserRepository mUserRepository; private final InteractorSchedulers mSchedulers; @Inject public GetUserUpdatesInteractor(UserRepository userRepository, InteractorSchedulers schedulers) { mUserRepository...


RxJava toList – completes only after onComplete is called

  mGetActiveHubUpdatesInteractor.getActiveHubUpdates() .filter(Optional::isPresent) .firstOrError() .map(Optional::get) .flatMap(activeHub -> mGetActiveHubEventsInteractor.getActiveHubEvents(activeHub, startTime, endTime)) .flattenAsObservable(list -> list) .map(mActiveHubEventUiMapper::toUiActiveHubEvent) .toList() .subscribe(this::populateEvents, this::handleError); This is a quick reminder for those of you who use RxJava and the toList() operator.  toList()...


Meet RxJava 2

Researching Android I recently understood that there is RxJava 2 waiting to be released in a month. So It is interesting what the new features are. Check this video from Jake Wharton: This Medium post...