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
4
votes
2 answers

How to get Json Response in Arraylist from List using RxJava and Kotlin

Facing Problem on getting Response in ArrayList. I have following Respose on String value var res_message: String = "" res_message = "${result.vehicletypes} " Getting below Value on this String [VehicleType(_id=1, vehicleType=Hatchback,…
Nitin Karande
  • 1,280
  • 14
  • 33
4
votes
1 answer

How to Listen to more than Three Fields in Observables.combineLatest

I have code to listen to exactly three fields using Observables.combineLatest Observables.combineLatest(text_name.asObservable(),text_username.asObservable(), text_email.asObservable()).subscribe({ t -> if (t.first.toString() !=…
4
votes
1 answer

RxKotlin collectInto() MutableList using method references

The following code is my attempt to convert an RxJava example into Kotlin. It's supposed to collect a bunch of Int's into a MutableList, but I get a host of errors. val all: Single> = Observable .range(10, 20) …
junglie85
  • 1,243
  • 10
  • 30
4
votes
0 answers

Exception caused by: java.lang.ClassNotFoundException: org.reactivestreams.Publisher

In a JavaFX Gradle-based application that I develop using RxJava and Kotlin in IntelliJ IDEA 2017.1.2 (Build #IC-171.4249.39), I'm getting an exception: Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError:…
Andrew
  • 2,148
  • 5
  • 23
  • 34
4
votes
2 answers

RxJava- Turn Observable into Iterator, Stream, or Sequence

I know this breaks a lot of Rx rules, but I really like RxJava-JDBC and so do my teammates. Relational databases are very core to what we do and so is Rx. However there are some occasions where we do not want to emit as an Observable but…
tmn
  • 11,121
  • 15
  • 56
  • 112
4
votes
1 answer

rx kotlin subscription not working, not receiving items

I created a function which returns an Observable with file names, but I don't get any event in my subscription where I call this method. Also there is no call of onError, or onComplete See my code: fun getAllFiles(): Observable { …
Stephan
  • 15,704
  • 7
  • 48
  • 63
3
votes
2 answers

What is the difference between defer() and defer{}

I am studying RxKotlin and the question arose: what is the difference between defer() and defer{}
Sunbey13
  • 339
  • 4
  • 12
3
votes
1 answer

Rxjava - How to get the current and the previous item?

How do to use operators so that i always get the previous and the current value? If possible i want to avoid creating state outside the pipe. - time -> 1 2 3 4 | | | | Operations | | | (1,2) …
felix-ht
  • 1,697
  • 15
  • 16
3
votes
1 answer

Error Handling of Rxjava in mvvm using retrofit

I am calling one api which gives Http status code 400 This is my NetworkBoundResourceNoDb public abstract class NetworkBoundResourceNoDb { private Observable> result; @MainThread protected…
3
votes
0 answers

UnitTesting async code rxjava/rxkotlin fails with latch = 1 error

So I have the following test that keeps failing with the following error: java.lang.AssertionError: No values (latch = 1, values = 0, errors = 0, completions = 0) val ocrProcessor = mockk() val date =…
Reshad
  • 2,570
  • 8
  • 45
  • 86
3
votes
1 answer

How can I use the response result of an RXJava call as a condition for an if statement inside another RXJava function?

I am making 2 RX calls that are nested within each other and are co-dependent. There is an issue with the server (which cannot be solved right now for various reasons) which returns errors in the 2nd nested call. Until this gets solved, I need to…
Glenncito
  • 902
  • 1
  • 10
  • 23
3
votes
1 answer

Take elements until a certain character and group them with RxJava

I have a simple setup to a problem but the solution seems to be more complicated. Setup: I have a hot observable which originates from a scanner that will emit every number as a different element and an R when a code is complete. Problem: From this…
Siebe
  • 942
  • 2
  • 10
  • 27
3
votes
1 answer

RxJava/Kotlin Observable method call chain - how to terminate?

I want to implement method to edit a note, save it to local database (cache) and then send it to the server as a POST request. I am learning RxJava and I wanted to create Observable from the note and then apply transformations on it, like to map it…
Angelina
  • 1,473
  • 2
  • 16
  • 34
3
votes
3 answers

Populate a RecyclerView with rxkotlin: The Recyclerview stay empty

Here is a kotlin activity which should display a list of events (from sample.json) class TalksActivity : AppCompatActivity(), TalkAdapter.Listener { private val TAG = TalksActivity::class.java.simpleName private var mCompositeDisposable:…
psv
  • 3,147
  • 5
  • 32
  • 67
3
votes
1 answer

RxSwift like Actions for Android

I was first introduced to reactive programming with ReactiveCocoa several years ago. In there they had the notion on RACCommands, which was carried over to RxSwift with the extension library Action. As stated on their GitHub page: An action is a…
Zappel
  • 1,612
  • 1
  • 22
  • 37
1 2
3
15 16