1,768 questions
0
votes
0
answers
90
views
How to cleanup an Observable.take(1) properly?
I have here an Observable, inwhich I combine two observables:
someOtherObservable
.switchMap {
Observables
.combineLatest(
RestClient
....
0
votes
0
answers
54
views
Which is the better way to run a long running impersistance task in a multi module android project?
I have a multi module architecture android project, where there are modules like module A, module B, module C and shared common module. Each modules code is private. Other modules cant access directly,...
0
votes
0
answers
59
views
Transform Callback into Observable with data from other Observable
I'm new to RxJava and I got a question about transforming callbacks into Observables.
I have this function that uses a callback.
client.loadAsync(body, object : Callback {
override fun onSuccess(...
0
votes
2
answers
415
views
RxJava RxAndroid repeat API call with different request body in Android
I have a list of users and I need to save users one by one via API call. I tried the below code and it sends the same user for all API calls.
gradle
implementation 'io.reactivex.rxjava2:rxandroid:2.1....
0
votes
1
answer
101
views
Multiple chained API calls to fetch data, but doOnNext of PublishSubject is never reached
I have a problem to understand a chained "RXJava-Retrofit" API call. I got inspired by this and implement this class named ObservationLoader to load the data from the API bucket per bucket. ...
0
votes
1
answer
298
views
RxAndroidBle waiting for response from peripheral when write on it (not long write) in Kotlin
I am trying to write to a peripheral in Android Kotlin using RxAndroidBle. The application writes to the peripheral and then the peripheral responds if this write request is successful, i.e.
According ...
0
votes
0
answers
392
views
How to wait for completion of multiple Observables in RXJava?
I have multiple tasks, each being executed on Schedulers.newThread(). The task is a method, which returns Observable<Long>.
The overall structure looks like this:
public void ...
0
votes
1
answer
222
views
Android - RxJava - Race condition
I am new to the concept of multi-threading and also new to RxJava. I think I ran into a race condition in my Android project.
To be able to demonstrate it better, I downloaded the google codelabs ...
1
vote
1
answer
73
views
RxAndroid: Fetch data from multiple apis
I have a usecase where I get list of userids from 1 Api as a Single<List> and I need to fetch all the users from a different Api which returns Single.
fun fetchUserIds(): Single<List<...
0
votes
1
answer
156
views
Switch back to original thread after executing element of a chain
Is it possible to achieve something like this with RxJava, and if so - how:
There is chain of Rx operators, which is subscribed to with proper subscribeOn and observeOn
Inside the chain, there is a ...
1
vote
1
answer
263
views
How to use RxJava / RxAndroid in Android to make slow network call and update the UI?
I have started reading about RxJava / RxAndroid, but I can't find simple tutorial that covers typical thing, like getting network data and updating UI with the result.
Many tutorials cover scenario ...
1
vote
0
answers
52
views
How to create a stopwatch with Rx counting down to 0?
How can I create a stopwatch with Rx in Kotlinv with Observables, so anything can subscribe to it:
It shall remain even when I put the app in background
I start the Observable with anything I ...
0
votes
0
answers
405
views
How do I wait for a void function to finish executing before triggering a completable in Android?
I'm very new to RxJava/RxAndroid and I'm very confused with how to achieve this workflow:
Trigger void function
Once it completes, provide some sort of callback to start a Completable function.
I ...
0
votes
1
answer
113
views
How to signal an infinite observable to stop/continue emission?
Problem description
I writing an Android application in Java to handle RFID reading based on some proprietary library and hardware. The RFID reader has a JNI library, which acts as an API to the ...
0
votes
0
answers
302
views
Memory leaks in general in RxJava
I wanted to ask something with regards to memory leaks in general in RxJava.
Once a Single or Completable's subscription terminates (i.e. after onSuccess or onError, etc. is called), is it safe to ...