Questions tagged [rx-java3]
149 questions
0
votes
0 answers
Rx: zip List> to Single>
- >
Note: This problem is same for Observable, with more variations like combineLatest. So I've picked Single as the minimal example.
I routinely encounter situations where there is a list of sources of same type and they all must emit before…

Agent_L
- 4,960
- 28
- 30
0
votes
1 answer
RxJava: UndeliverableException when flatMap combined with switchMap
TL;DR
I think that flatMap combined with switchMap might not terminate the stream correctly, thus UndeliverableException happens. How can I fix this?
The Structure
I'm making a little bit complex stream -- combined with flatMap and switchMap -- like…

Samuel T. Chou
- 521
- 6
- 31
0
votes
1 answer
How to extend Observables.combineLatest() with fourth source?
Imagine there are two BehaviourSubject with Strings:
private val subjectLocationA = BehaviorSubject.createDefault("London")
private val subjectLocationB = BehaviorSubject.createDefault("Paris")
were I update location each…

Ralf Wickum
- 2,850
- 9
- 55
- 103
0
votes
1 answer
perform operation after each delay is complete in RxJava
I am trying to simulate the delay while emitting items in a specific sequence
Here I am trying to simulate the problem
List integers = new ArrayList<>();
integers.add(1);
integers.add(2);
integers.add(3);
…

Hunt
- 8,215
- 28
- 116
- 256
0
votes
0 answers
How to use RxJava inside Service in Android?
After parsing the JSON data with the help of Volley library, I want to save it to Room. Since the process was taking too long (about 45 seconds) I put this inside a Service. In the same way, I was using AsyncTask to prevent the insert operation from…
user17115124
0
votes
1 answer
Correctly handling backpressure from an async call
I have some code that looks roughly like this:
Completable handle(Observable

Cheetah
- 13,785
- 31
- 106
- 190
0
votes
0 answers
RxJava 3: How to use Futures with Observables/Singles
I'm relatively new to RxJava and I'm curious about how to use Futures with RxJava's Observable and/or Single. What I'm trying to make is a system to connect to a MongoDB database and load MongoDB collections. I would imagine that I could use…

Atlas
- 9
- 3
0
votes
0 answers
RxJava: How to subscribe to 2 observables in order and merge their result?
To set the stage, I have 2 network calls, the 2nd one depends on the result of the 1st.
fun netCall1(): Observable{...}
fun netCall2(data: Data1): Observable{...}
How do I create a stream that subscribes to netCall1(), uses the…

Some Noob Student
- 14,186
- 13
- 65
- 103
0
votes
1 answer
"JsonEOFException: Unexpected end-of-input" when sending a stream to a Rxjava2 endpoint
I'm trying to work out how to call to an endpoint that accepts a @Body parameter of Flowable, to subscribe it to process the incoming stream (using Micronaut and the RxJava framework). I have this controller in Micronaut:
@Post(uri =…

Jim Renwick
- 3
- 1
0
votes
0 answers
Rxjava error handling:App not crash after subscription ends
while learing rxjava/rxandroid i have came across one scenario. please help me to understand it.
please check below code.
val observable:Observable = Observable.create {
Log.d(TAG, "start emission")
it.onNext(1)
…

akash
- 127
- 1
- 8
0
votes
2 answers
Problems with RXJava
I'm adapting some sample code from what3words for accessing their API via their Java SDK. It uses RXJava.
The sample code is:
Observable.fromCallable(() -> wrapper.convertTo3wa(new Coordinates(51.2423, -0.12423)).execute())
…

Fat Monk
- 2,077
- 1
- 26
- 59
0
votes
1 answer
Does RxJava PublishProcessor cares about back pressure by default?
I wanna know more about RxJava PublishProcessor. Does it handle back pressure by default or we should add this behavior to it by onBackPressure funtions?

Hassan Alizadeh
- 103
- 1
- 8
0
votes
0 answers
Global error handling with RxJavaErrorHandler
I have the below method which throws an exception and want to catch that exception on the global level
public Maybe get(ProductSearchCriteriaCommand searchCriteria) {
LOG.info("Controller --> Finding all the products");
…

San Jaisy
- 15,327
- 34
- 171
- 290
0
votes
2 answers
A 'return' expression required in a function with a block body ('{...}'
I want to call api using rxjava3 inside getCampaigns function in CampaignRepositoryImpl.kt class but I am getting following error A 'return' expression required in a function with a block body ('{...}')
below CampaignRepositoryImpl.kt…

Jack Philips
- 31
- 8
0
votes
1 answer
switchMapSingle() doesn't cancel previous request
I have DB table 'order' with 6000 rows and I want to create searching in it by number using switchmap for canceling previous request. But it's not work, it always returns result of previous request. What is wrong with my code?
Example: enter 1..0..7…

ox-grom
- 11
- 3