Questions tagged [rx-kotlin]

RxJava bindings for Kotlin programming language

RxKotlin is open sourced and available under the Apache License, Version 2.0

238 questions
0
votes
0 answers

How to call API one by one and return one at a time in rx kotlin android

this viewmodel method is calling in oncreate: override fun deleteVideoOneByOne() { deleteFileCount = getSelectedFilePath().size for (i in 0 until deleteFileCount) { listOfDeleteItemPosition =…
MARSH
  • 117
  • 1
  • 7
  • 22
0
votes
0 answers

How to call one API with different paramet in Rx Kotlin in Android

This is function fun deleteSingleVideoOneByOne(path: ArrayList) This is implementation override fun deleteSingleVideoOneByOne(path: ArrayList) { val apiService = RetrofitInstance.getApiServiceXMLForR2( …
MARSH
  • 117
  • 1
  • 7
  • 22
0
votes
1 answer

How to execute for loop one by one synchronous in ex kotlin

private fun sendListOfFeedBack(listOfFeedBack: ArrayList, email: String, firstName: String, lastName: String, uuid: String):…
MARSH
  • 117
  • 1
  • 7
  • 22
0
votes
0 answers

Cannot serialize Observable

I'm using Retrofit, RxJava (or rather RxKotlin) and Moshi to do a simple GET request which would return a single instance of my data. I'm using RxJava3 if that matters. I'm using coroutines to send a request so I can visualize the data. I'm getting…
0
votes
2 answers

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.1' implementation…
AndroidDev
  • 35
  • 5
0
votes
2 answers

Combine Singles and generate a data class Single

I have a question around Single and haven't been able to find a good answer for that yet. I have to return a Single from a method where I get 2 Single sources. The problem is I need to use the output of the 2 singles to modify a class and then send…
0
votes
0 answers

RxJava - How to get an observable that is generated through iterating from another Observable

I am trying to generate an Observable through using and looking at last 4 data from another Observable. I am not able to figure it out yet. I have a data class A(val b: B) . Then I have the following obeserver // My value storer. That keeps on…
0
votes
0 answers

Server connection status with RxJava in Android

I have a websocket connection object StompWrapper { private var emitter: ObservableEmitter? = null init { val client = OkHttpClient.Builder().build() val stomp = StompClient(client) stomp.connect() …
iormark
  • 23
  • 4
0
votes
1 answer

How to stop Observable.fromiterable and restart iteration with new list?

I am having a list of images which i wanted to download.So below is the code which i used: Observable.fromIterable(imagelist).subscribeOn(Scheduler.io). subscribe { //download logic }.addtodisposible(compositedisposible) Initially, all downloaded…
Allan Antony
  • 21
  • 1
  • 5
0
votes
0 answers

Delay invoke of Completable function after concatWith is success(RxJava/RxKotlin)

I am looking a way to delay invoke of an Completable function after first Completable is success and all logic is finished. fun invokeSomeLogic(): Completable { return firstCompletable() ----> lets assume is success …
DM developing
  • 423
  • 5
  • 15
0
votes
1 answer

Is it possible in Rx java kotlin to remove timeout or abort observable on success

I have the following code, and when succesfully onNext is received after 5 minutes I am receiving onError as there is timeout, so how can I disable timeout or abort disposable to not call doSomethingElseUnSuccesfull() after doSomethingSuccesfull()…
Paruyr
  • 37
  • 1
  • 8
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

Improve chaining multiple (three) Completables by using RxJava

I want to invoke one Completable after another. That is when first is finished, invoke second and when the second is finished, invoke the third one. I already tried some different stuff like andThen(), but found out it does not "wait" for previous…
DM developing
  • 423
  • 5
  • 15
0
votes
1 answer

RXKOTLIN/RXJAVA: Communication between the socket using Observables

I am a newbie to RXKotlin/RXJava. I am developing the background service in Android. In my service, I have Bluetooth socket TCP Socket Whenever the data is available on the Bluetooth socket, read and write to the TCP socket. And whenever data is…
RKVM
  • 67
  • 6
0
votes
1 answer

refCount keeping connection even after an error

I'm using refCount to hold onto a BLE connection for 5 mins. This works well until I have a connection issue, refCount still keeps the connection and replay replays the error. Is there a way I can make either make refCount disconnect as soon as…
RefuX
  • 490
  • 5
  • 11