rx-java2 Questions
3
Solved
I'm using Retrofit, OK-HTTP and RxJava2 to handle network calls, I created below interceptor to handle the Network error response for each network calls, Is there a better way to Handle this?
Is th...
1
I am using Retrofit2 and Rxjava2 in my android app as a networking library and NodeJS and MongoDB as a backend service.I want to fetch data from server and store data in room database in order to i...
Intenerate asked 4/6, 2019 at 11:22
1
Solved
I wanna use RxJava binding APIs for Android UI widgets in my project.
Therefore following the guidance as per this site 'https://github.com/JakeWharton/RxBinding'
But I am unable to import any A...
Updo asked 28/5, 2019 at 9:4
5
Solved
I have Observable stream, and I want to convert it to Completable, how I could do that?
Griffie asked 3/11, 2016 at 10:40
2
Solved
I'm using Android's Room library for the database interaction in an application and I'm sort of stumped on how to prevent duplicate entries from being inserted into the database.
I feel like I mus...
Adversaria asked 24/10, 2017 at 17:16
2
I have a room query:
@Query("SELECT * FROM classes WHERE _id IN(:values) ORDER BY date DESC")
fun getClassesByIds(values: List<Int>): Maybe<List<YClass>>
compositeDisposable....
Antonetta asked 5/3, 2018 at 22:56
2
Solved
I am currently choosing between RxJava 1.x or 2.x for my current project.
I basically need a PublishSubject with a backpressure strategy onBackpressureLatest().
I want to choose RxJava 2.x, but i...
2
Solved
I am try to use the following code
initLocalSettingsIfNeed()
.andThen(initGlobalSettingsIfNeed(configuration))
.doOnComplete(callback::onSuccess)
.doOnError(throwable -> callback.onError(thro...
2
Solved
I have an API which returns only error/success codes, with no body. With RxJava1 I would have used Observable<Void> as the return value for this call.
What can I use for RxJava2? The hint o...
Raffarty asked 7/2, 2017 at 15:44
2
Solved
I have a chain of calls to internet, database and as result I show collected info to user. Now I have very ugly 3-level nested RxJava stream. I really want to make it smooth and easy to read, but I...
6
Solved
I have the following method:
public class ParentalControlInteractor {
public Single<Boolean> isPinSet() {
return bamSdk.getPinManager().isPINSet();
}
}
I want to call this function to ...
2
Let's assume I have a following case for Android:
Request list of groups from network
Show some UI elements for each group
Request items for each group
Show UI elemets for
each item
I want to...
1
I have a service call that returns a JSON response which is then passed through a data manager that transforms the data if service is success or creates an error body if the call is a failure.
The...
1
Solved
The versions i'm using are
implementation 'io.reactivex.rxjava2:rxjava:2.2.4'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
impl...
Sarcophagus asked 27/2, 2019 at 12:14
2
Solved
I have a usecase where I initiallize some global variables in a Completable , and in the next step in the chain (using andThen operator) I make use of those variables.
Following sample explains my...
2
Solved
So simply, the DAO
@Query("DELETE FROM Things WHERE someIdOfTheThing IN (:listOfId)")
abstract fun deleteThings(listOfId: MutableList<String>): Maybe<Int>
usage,
mDisposables.add(m...
Wedgwood asked 17/2, 2019 at 0:54
2
Solved
I am accessing database using Maybe and my goal is to call the network if Maybe will complete indicating that there is no data in database (I am using room). I have following functions:
@Override
...
Stabilizer asked 4/4, 2018 at 9:7
3
I am totally new to RxJava and reactive programming.
I have an assignment where i must read file and store it to Observable. I have tried to make a Callable with BufferedReader inside and use Obse...
Dannie asked 16/4, 2017 at 21:45
1
Given Hystrix going into mainentance mode, I've been working on migrating a (rather large) codebase to Resilience4j.
I make heavy use of the following pattern with Hystrix:
new HystrixCommand<...
Guzel asked 17/1, 2019 at 15:16
1
Solved
I have read the explanation about blockingSubscribe() and subscribe() but neither I can write nor find an example to see the difference of these. It seems that both of these work the same way. Coul...
1
While subscribing to a Reactive Extensions Flowable stream, I noticed the stream halts/hangs (no more future items are emitted, and no error is returned) after 128 items have been returned.
val do...
3
Solved
I am running into an issue where my observable is subscribed on an IO thread and observed on the android main (UI) thread but the doFinally operator is run on the IO thread and it needs to be run o...
0
Let's say you have a MVVM app with a UI layer, a ViewModel, and a Repository. Say that in your repository, you're getting some data from an API with Single Retrofit calls, and transforming it into ...
Bellboy asked 13/12, 2018 at 23:19
1
Solved
TO BE CLEAR:
The most likely part of the code which has the problem is the connect function, which you can find in the code block.
EDIT:
I've had a good dig through LogCat and found something in...
Emmet asked 4/12, 2018 at 19:36
2
My goal (and also question) is to do, let's say, centralized error handling. For most of cases errors for each API endpoint is going to be handled in the same way, so I don't want to have duplicate...
Adventurer asked 4/12, 2018 at 14:29
© 2022 - 2024 — McMap. All rights reserved.