rx-java2 Questions
3
PagedList<Object> is used for Android's cool paging library. To make the question as minimal as possible :
If i have a list of strings like
List<String> stringList; // it consists of ...
Quinlan asked 25/4, 2018 at 19:34
6
Solved
I'm trying to tidy up my code a little, and Single is looking like a good choice for me as I'm doing something that will only ever emit one result.
I'm having an issue though as I was using flatMa...
Transparency asked 14/3, 2017 at 12:1
8
Solved
I have the following method that makes a request to get a pokemon from a endpoint.
I would like to prevent the user in making rapid requests by clicking quickly on the button that will invoke this ...
2
Solved
A requirement of my application is to allow the user to progress through multiple steps, then upon completion write values to the database based off of entries in each step. Each step in the UI may...
Impropriate asked 1/3, 2018 at 21:8
4
Solved
When using rxjava 1.x i used to return Observable<Void> to handle empty response from retrofit:
@POST( "login" )
Observable<Void> getToken( @Header( "Authorization" ) String authorizat...
2
When should we use Completable.fromAction() and when should we use Completable.fromCallable() Is there a specific Usecase
From the documentation it seems that both do the same thing and it is hard...
3
Ever since i'v integrated RxJava2 , i am receiving 401 unauthenticated error in all retrofit calls that return Observable , i'm using basic authentication and i know error is due to it , but why it...
Yungyunick asked 23/1, 2017 at 12:15
1
Solved
I have This method that calls a Rest API and returns the result as an Observable (Single):
fun resetPassword(email: String): Single<ResetPassword> {
return Single.create { emitter ->
v...
Stalkinghorse asked 19/5, 2020 at 10:51
7
Solved
I've upgraded to Android Studio 3.1 today, which seems to have added a few more lint checks. One of these lint checks is for one-shot RxJava2 subscribe() calls that are not stored in a variable. Fo...
Rustication asked 27/3, 2018 at 21:22
4
Solved
observeOn:
This method simply changes the thread of all operators further downstream
(https://medium.com/upday-devs/rxjava-subscribeon-vs-observeon-9af518ded53a)
When calling API, I want to run th...
4
Solved
In the following code, how and where to put unSubscribe to make un-subscription of the Observable explicitly exactly after finishing the onComplete?.
getObservable()
.observeOn(AndroidSchedulers....
Delphinedelphinia asked 24/12, 2017 at 7:44
3
Solved
Android Studio 3.0 Beta2
I have created 2 methods one that creates the observable and another that creates the subscriber.
However, I am having a issue try to get the subscriber to subscribe to ...
3
Solved
In RxJava 1, there was CompositeSubscription, but that is not present in RxJava2, There is something CompositeDisposable in rxJava2. How do I use CompositeDisposable or Disposable in RxJava2?
Peppermint asked 29/8, 2016 at 10:17
1
DAO.class:
@Dao
public interface VisitorDAO {
@Query("Select * from visitor")
Flowable<List<Visitor>> getAll();
@Insert
Completable Insert(Visitor visitor); //Using Single or May...
Lotic asked 8/3, 2020 at 12:30
5
Solved
I want to achieve that if i call the Obervable.subscribe(Action1) method, it does not throw OnErrorNotImplementedException anywhere, but if i call Obervable.subscribe(Action1, Action1), the second ...
2
Solved
I want to do the following but in Rx. The startActivity(intent) is guaranteed to be called since finish() is just an async call queued:
private fun launchNewActivity(){
...
finish()
startActivi...
Loughlin asked 28/2, 2020 at 2:20
5
Solved
Hare is my app gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.atumanin.testandroidannotations"
minSdkVersion 15
tar...
Plenish asked 14/11, 2017 at 14:22
2
Solved
After reading multiple blog posts and documentation, I came to the conclusion that following doOnSubscribe will be executed on a worker thread:
Observable.just(1)
.observeOn(Schedulers.io())
.do...
Swashbuckler asked 28/4, 2018 at 10:37
2
Solved
It seems that there are two kinds of error in RxJava:
Errors caught by a subscriber in onError
And errors caught globally by the handler set by RxJavaPlugins.setErrorHandler
I am having some...
3
Solved
I get the following error, if I change the orientation of my device while my app is fetching new redditNews.
E/AndroidRuntime: FATAL EXCEPTION: RxCachedThreadScheduler-1
Process: com.spicywdev....
3
I am new to android and I have a scenario where I want to get get data from multiple api. Let suppose api_a, api_b, api_c, api_d. These api are independent of each other but I want to show data fro...
Forestaysail asked 30/6, 2018 at 7:7
4
Hey there I am using Dagger2, Retrofit and OkHttp and I am facing dependency cycle issue.
When providing OkHttp :
@Provides
@ApplicationScope
OkHttpClient provideOkHttpClient(TokenAuthenticator ...
Blackness asked 11/5, 2017 at 11:49
3
Solved
In RxJava 2 Flowable there are different backpressure strategies, among them the most interesting are:
LATEST
BUFFER
DROP
which are respected throughout whole Rx chain.
In Kotlin there is Flow...
Porphyrin asked 25/1, 2020 at 15:24
6
Solved
I'm developing an Android app using Clean Architecture and I'm migrating it to RxJava 2.x. I have to make some network requests to a soap service, so I defined the api interface in the domain modul...
Fregger asked 1/3, 2017 at 7:25
4
Solved
As I understand RxJava2 values.take(1) creates another Observable that contains only one element from the original Observable. Which MUST NOT throw an exception as it is filtered out by the effect ...
Thousandth asked 20/4, 2017 at 16:29
© 2022 - 2024 — McMap. All rights reserved.