rx-java2 Questions

2

Solved

When trying to use RxJava with room, I am getting an error that the generated code is wrong. When returning a Single, it works fine. But when using flowable or observable its adding an extra boolea...
Amoy asked 11/4, 2019 at 1:55

2

Solved

I'm trying to rewrite interactors with rxjava chains to kotlin flow. In LocationHandlerImpl I'm using LocationService for getting my current location. In addOnSuccessListener and addOnFailureListen...
Betaine asked 22/11, 2019 at 8:31

2

Solved

I'm using Android Room with RxJava dependencies { implementation 'androidx.room:room-rxjava2:2.1.0-alpha02' } I need to get Completable from parameterized deletion methods, I thought this featu...
Suppuration asked 1/1, 2019 at 21:5

1

Android Studio 3.5.2 RxJava2 Kotlin 1.3.50 I have the following class that acts like a timer. class DelayTimerImp(private val scheduler: IScheduler) : DelayTimer { override fun createTimeout(...
Aerometry asked 11/11, 2019 at 15:28

4

Solved

I have two source observables. I would like to merge the two source observables, but the merged observable sould complete as soon as one of the source observables completes. Desired behavior: Sou...
Abbott asked 19/12, 2017 at 14:12

4

Solved

There is a from method in the Observable class in rxjava 1 but not found in rxjava 2. How can I replace the from method in rxjava 2 in the following code: List<Integer> ints = new ArrayList...
Beaming asked 12/1, 2017 at 5:15

3

Solved

I have a method which creates an emitter like below, there are a problem(maybe it is normal behavior) with calling onError in retrofit callback. I got UndeliverableException when try to call onErro...
Shaper asked 10/5, 2017 at 6:10

2

Solved

I am using Room for my Database management and I was confused in what to use while working with real-time data. For now, to manage real-time data I am using Flowable and am I pretty satisfied with ...

2

I have playing with Rxjava recently trying to implement a chain of events(Api callas/Database operations) and seem to have hit a roadblock when it comes to handling errors. This is what I am tryi...
Darra asked 4/4, 2018 at 5:2

10

Solved

I am encountering a RuntimeException when attempting to run JUnit tests for a presenter that is using observeOn(AndroidSchedulers.mainThread()). Since they are pure JUnit tests and not Android in...
Diehard asked 11/4, 2017 at 21:14

3

Solved

I want to be able to unit test an Observable that has a delayed emission, but without actually waiting for the delay time. Is there a way to do this? I'm currently using a CountDownHatch to delay...
Sangfroid asked 14/11, 2017 at 23:28

4

Solved

I wondered if someone can shed some light on this question, when to use Single.fromCallable( ()-> myObject ) instead of Single.just(myObject) from the documentation, Single.fromCallabl...
Tricho asked 5/10, 2018 at 17:25

1

I'd like to organize a thread barrier: given a single lock object, any thread can obtain it and continue thread's chain further, but any other thread will stay dormant on the same lock object until...
Alanealanine asked 6/9, 2019 at 8:6

1

Solved

TL;DR: I want to execute multiple Calls (Retrofit) like you can .zip() multiple Observables (RxJava2). I have a retrofit2 function: @GET("/data/price") Call<JsonObject> getBookTitle(@Quer...
Ultimogeniture asked 29/8, 2019 at 9:46

4

Solved

I'm trying to accomplish the following: Return some data as single, execute a completable after. The following code does not compile due to single.andThen(). The actions need to be executed in this...
Loot asked 2/2, 2018 at 19:31

3

I'm trying to implement BiFunction interface from RxJava in Kotlin and I'm getting a NullPointerException. This is the Java interface that I'm implementing in Kotlin. It's from RxJava 2. package ...
Pondweed asked 21/8, 2019 at 16:45

3

I use Clean Architecture pattern in my app together with MVVM architecture. So I have UseCases for single operations, like for example, LoginUseCase, DownloadAttachmentUseCase etc. What I am curio...
Mohammed asked 16/8, 2019 at 12:10

6

Solved

I have a BehaviorSubject that I would like to reset - by that I mean I want the latest value to not be available, just as if it was just created. I don't seem to see an API to do this but I suppos...
Spunky asked 30/8, 2017 at 12:12

1

Solved

I've been working in Spring Reactor and had some previous testing that made me wonder how Fluxes handle backpressure by default. I know that onBackpressureBuffer and such exist, and I have also rea...
Expertize asked 31/7, 2019 at 17:24

1

Solved

I'd like to know what happens when we have multiple subscribeOn() methods in a RxJava chain. For instance if I had a chain that was something like this, Single.fromCallable { repository.apiCall1(...
Wholly asked 29/6, 2019 at 9:16

2

Solved

I use concatMap to process a stream of items one at a time with a long running operation. At some point I need to "interrupt" this long running operation, but only for the current item: @Test publ...
Invoke asked 7/4, 2019 at 1:45

1

I do a remove action through RxJava2 that causes a refresh on my local cache like this: override fun removeExperience(experienceId: String, placeId: String): Completable { return from(placesApi.d...
Topper asked 18/7, 2018 at 16:3

2

I'm working with a paginated API. I have used the following solution provided by Adam Millerchip and it works well. import java.util.ArrayList; import java.util.Arrays; import java.util.List; imp...
Librarianship asked 26/6, 2019 at 11:49

3

The following code package com.inthemoon.snippets.rxjava; import io.reactivex.*; public class HelloWorld { public static void main(String[] args) { Flowable.just("Hello world").subscribe(Syst...
Anjelicaanjou asked 24/1, 2017 at 8:53

3

Solved

I have a problem with writing the .zip Observable in Kotlin using Android Studio 3.0 IDE. Here is my code: internal var updateStringEventsSubject = PublishSubject.create<String>() internal...

© 2022 - 2024 — McMap. All rights reserved.