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 get data from Firebase Cloud Firestore in Kotlin

So I have a database in Firebase Cloud Firestore that stores users and tasks. Each user has a number of fields such as name, username,etc. I want to know how to fetch each field that is associated with each user using Kotlin. I'm trying to get all…
0
votes
1 answer

MvRX DrawerLayout + generally more examples wanted

I'm trying to set up a DrawerLayout in the MvRx sample project but i am kind of stuck. Totally new to both epoxy and MvRx in general and i have been playing around for a week now learning about the framework and testing components i need to convert…
0
votes
2 answers

How to pass modified list downstream in RxJava in Android?

I have following code that works well. Observable.from(...) .map { // List if (My_Condition_is_true) { //... } val newList = getNewListIfConditionIsOkay(it) newList.map { item ->…
Hesam
  • 52,260
  • 74
  • 224
  • 365
0
votes
1 answer

ReactiveX - Single to Single

I'm looking to make a sample project with a clean architecture approach and i have some difficulties to transform a single to another. I have my retrofit service (with a Single) : @GET("nearbysearch/json") fun getNearbyPlaces(@Query("type") type:…
JohnDot
  • 119
  • 1
  • 1
  • 2
0
votes
1 answer

How to parse success body response on http exception 401?

I have trying to parse actual response body even if server returns 401 HTTP Exception. protected inline fun executeNetworkCall( crossinline request: () -> Single, crossinline successful: (t:…
Ankit Kumar
  • 3,663
  • 2
  • 26
  • 38
0
votes
1 answer

How to chain an Observable with a Single in RxJava?

I am new to the Rx world so please bear with me. My code is in Kotlin but a Java code will help also. I have 2 methods, one of them loads tasks from the database, if there are tasks, I want to send them to the server. fun getListFromDb():…
0
votes
1 answer

How to put header in url using volley in Kotlin?

My code- val accessTokenRequest: JsonObjectRequest = JsonObjectRequest(Request.Method.GET, url, Response.Listener { response -> }, Response.ErrorListener { error -> …
0
votes
1 answer

RxKotlin - Wrong subscribeOn, observeOn thread changing for Subject out of Activity?

I have an object that generates different strings in the random moments of time, and i need to sudscribe to this generator to take these strings and provide them to ui (maybe it will be multiple subscribers in different activities). Suppose, i got…
0
votes
4 answers

can we swap two numbers in kotlin using two variables and take input from user?

I tried it by the following program but it shows the error that kotlin variable is expected: [
0
votes
1 answer

Converting Flowable> to Single

I have an function in @Dao. Lets call that class DaoClass abstract fun getData() : Flowable> Now, I want to check if list of data returned is empty or not. I dug through the DaoClass_Impl (generated at build time) and I found out that the…
Rahul
  • 4,699
  • 5
  • 26
  • 38
0
votes
1 answer

RxKotlin repo gradle build compilation fails with gradle 4.7 (JDK 1.8)

I tried the following: $ git clone https://github.com/ReactiveX/RxKotlin.git $ cd RxKotlin/ $ gradle build It fails with: ...FAILURE: Build failed with an exception. Where: Build file '/home/myuser/RxKotlin/build.gradle' line: 13 What…
0
votes
1 answer

List not emitting on remove item (RxKotlin)

I'm working on an Android App. I have a list of photos loaded in memory. I want to make use of Reactive library, so I declare a memory-base datasource where I save the list: @Singleton class MemoryPhotosSource @Inject constructor() { …
0
votes
1 answer

Retrofit Dynamic URL still appends to the Base URL

Here is my Retrofit Interface and creation code: interface SSApi { companion object { private fun create(): SSApi { val httpClient = OkHttpClient().newBuilder() val networkInterceptor = Interceptor { chain -> val…
Dale Julian
  • 1,560
  • 18
  • 35
0
votes
2 answers

RXKotlin how do you map to void?

Sorry nooby kotlin question func someThingElse(): Observable { return Observable.just("aasd") } fun doSomething(): Observable { return someThisElse().fetch().map { () } } How do i return an observable of void? I tried void,…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
0
votes
3 answers

Is There A Limit to The Number of Observables in .zip Method?

There seems to be a limit to the number of Observables to use as parameters in the zip method for Kotlin. If this is accurate, what is the best alternative? For instance, when I use 9 parameters it works as expected. When I add a 10th parameter I…
AdamHurwitz
  • 9,758
  • 10
  • 72
  • 134