rx-kotlin Questions

6

I'm trying to observe observable on main thread by using: // Kotlin Code Observable .observeOn(AndroidSchedulers.mainThread()) but I'm getting following error: Type Mismatch: Required: rx....
Tutorial asked 22/4, 2017 at 21:6

8

Am using kotlin for developing the application.Now i want to get JSON data from server. In java am implemented Asyntask as well as Rxjava for read JSON from Url . Am also search in google but i c...
Decompound asked 3/7, 2017 at 10:43

4

Solved

val mutableList1: MutableList<TeamInvitationData?>? val mutableList2: MutableList<TeamInvitationData?>? addAll method can be use to merge nullable mutable list but, here it throws me ...
Burlington asked 12/1, 2018 at 11:22

6

Solved

Why would I want to use Kotlin's coroutines? It seems that the RxKotlin library is much more versatile. Kotlin's coroutines look significantly less powerful and more cumbersome to use in comparison...
Lustrous asked 6/2, 2017 at 10:55

1

I am trying to create a moving window of data using Kotlin Flows. It can be achieved in RxKotlin using a buffer, but buffer is not the same using Flows. RxKotlin has a buffer operator, periodically...
Necessitous asked 12/12, 2021 at 20:13

7

Solved

I initialize my variable like this:- val user: BehaviorSubject<User?> user = BehaviorSubject.create() But I can't do this. IDE throws an error:- user.onNext(null) And doing this, IDE s...
Squarely asked 25/7, 2017 at 5:23

3

Solved

I am stuck at this problem, which should be fairly simple. I need subscriber to execute a code block when the Maybe has completed as an Empty Maybe. I found that we can pass default Maybe value ...
Lauer asked 6/6, 2018 at 15:46

2

Solved

In an app that connects to bluetooth devices, I am using the following function using RxKotlin: private fun startBluetoothPair(device: BluetoothDevice) { Observable.just(device) .subscribeOn(Sch...
Baht asked 5/5, 2017 at 14:4

3

Solved

I am new to Android development with Kotlin and I am struggling on finding any useful documentation on how to create a simple GET and POST requests with the best current practices as possible. I am...
Hypothecate asked 7/9, 2020 at 12:25

4

Solved

What is the difference between rxjava2 dependency and rxkotlin dependency. If I'm using rxkotlin dependency, should i need to add rxjava2 dependency along with that. implementation 'io.reactivex....
Mccully asked 12/4, 2019 at 5:43

3

Solved

I have some problem. I'm a beginer in RxJava/RxKotlin/RxAndroid, and dont understand some features. For Example: import rus.pifpaf.client.data.catalog.models.Category import rus.pifpaf.client.data...
Aimo asked 26/11, 2016 at 12:39

4

Solved

I'm trying to test the following RxKotlin/RxJava 2 code: validate(data) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .flatMap { ... } I'm attempting to override th...
Somehow asked 7/4, 2017 at 18:40

2

Solved

I'm confusing about use case for doOnSuccess in rxJava. Let's see the code: Case 1: networkApi.callSomething() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOn...
Phosphorus asked 15/3, 2019 at 2:48

1

Solved

I have issue that I cannot solve. Im trying to .zip(List, ) multiple Singles into one using Kotlin and none of Functions i supply as second argument fits. fun getUserFriendsLocationsInBuckets(tok...
Aspectual asked 6/1, 2018 at 16:43

1

Solved

I am using RxJava/Kotlin with Room and Retrofit. I am sure I'm not making something write as I just started learning RxJava. The scenario is that I make a call to check if there are favorite record...
Stocktonontees asked 6/1, 2018 at 11:15

2

Solved

Observable.just(1) .flatMap(object : Function<Int, Observable<Int>> { override fun apply(integer: Int): Observable<Int> { return Observable.just(integer * 10) } }) .flatMap...
Tweeddale asked 12/2, 2018 at 18:57

3

Solved

I have a list List<FileModel> FileModel is just a class contains id: Int id - is ID of photo file I need to fetch and cast to Bitmap I have a request: fun getFile(fileId: Int): Single&lt...
Pharmacist asked 11/5, 2018 at 13:36

2

Suppose you want to insert a Completable in your Observable chain, such as for each emitted element, there is a completable that runs and blocks until it completes, what option would you choose? (h...
Phenosafranine asked 28/11, 2017 at 14:50

4

Solved

I have an object QuickSort that I am attempting to create 2 instances of. When I try to create 2 separate instances I can see that it is only using one instance because I have a count in the QuickS...

1

Solved

I've been working through the examples in the book Reactive Programming with RxJava, which is targeted at version 1 not 2. An introduction to infinite streams has the following example (and notes t...
Lumbricoid asked 13/6, 2017 at 15:34

1

I'm using rxAndroid and rxKotlin in my Android app to handle network requests asynchronously. Now I would like to retry a failed network request only after click on Snackbar button. My code now: ...
Action asked 23/4, 2016 at 10:16

3

I have got Observable<Rates> and Rate is just a simple object: Rate(val value:String){} Rates(val rates: List<Rate>) and i wanna change that Observable<Rates> into Observable&...
Polyethylene asked 31/10, 2016 at 2:48

2

Solved

I'm confused by Kotlin lambda syntax. At first, I have .subscribe( { println(it) } , { println(it.message) } , { println("completed") } ) which works fine. Then I moved the onNext to anot...
Enteric asked 23/1, 2016 at 18:14

1

Solved

I was having some issues using RxJava and Kotlin earlier. I made some interesting discoveries which I'm still puzzled about. There is the simple Func1 interface in RxJava public interface Func1&...
Ahumada asked 4/1, 2016 at 1:25

1

Solved

I am going to start using reactive programming in my Android project. I am using Kotlin as primary language and now I would like to apply Rx. My first choice was RxAndroid but then I noticed ...
Panamerican asked 17/11, 2014 at 8:46

© 2022 - 2024 — McMap. All rights reserved.