Questions tagged [rx-android]

RxJava bindings for Android

specific bindings for . RxAndroid module adds a number of classes to RxJava that make writing reactive components in Android applications easy and hassle free.

RxAndroid is open sourced and available under the Apache License, Version 2.0


Related tags

1768 questions
0
votes
1 answer

How to implement requests queue?

I have an application which uses methods from third-party SDK (async methods to make HTTP-requests to remote server) and Retrofit2 + OkHttp + Rx to access this server directly. It looks like this: new SdkRequest("some", "arguments", "here") …
BArtWell
  • 4,176
  • 10
  • 63
  • 106
0
votes
3 answers

Code can not compile when I try to use RxJava 2 with Room

I am trying to use RxJava 2 with Room ORM, but my code can not compile when I try to use RxJava 2. Here is the code from Contacts Dao. @Dao public interface ContactsDao { @Query("SELECT * FROM contact") Flowable>…
Zookey
  • 2,637
  • 13
  • 46
  • 80
0
votes
1 answer

requery db & rxjava observableResult calls subsequent function multiple times

On android I am using requery db and trying to upload my DB changes to server. To achieve the same, I am running the following logic Scheduler sub2 = Schedulers.newThread(); Scheduler ob2 = Schedulers.newThread(); data.select(Broadcaster.class) …
Jagan Veeraraghavan
  • 363
  • 2
  • 4
  • 14
0
votes
1 answer

Why can't it apply flatmap and subscribe on the same RxBleConnection observable twice?

As title, For simplicity, if i want to execute twice read operation with different UUID : (I know RxAndroidBle have provided a multiple read function) Observable ob = device.establishConnection(false); ob.flatMap(rxBleConnection…
楊舜淼
  • 73
  • 6
0
votes
1 answer

How to chain multiple observables with RxJava?

I am trying to perform some operatations when a activity onDestroy is called. I want start a Observable with a ID, then retrieve some data from Realm and execute a HTTP request to a backend based on the retrieved data and afterwards store the…
tomwassing
  • 925
  • 1
  • 10
  • 30
0
votes
1 answer

Whose responsibility to enforce threading in RxJava/RxAndroid, caller's or callee's

In RxJava/RxAndroid, you often need to enforce the threading especially when doing network operations, for example: Single.fromCallable(/*download*/) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) Support the…
Cheng Xu
  • 164
  • 9
0
votes
2 answers

Gson can't detect the class variable

I used Rxjava with retrofit and also use Gson as parser. my class has several field and the important field that i deal with is firstName, lastName, NationalCode. i don't know why when i get the result from the server I can't get the national code…
Hussein Ojaghi
  • 2,260
  • 3
  • 23
  • 41
0
votes
2 answers

How to cancel request in retrofix2.0 (rxandroid) when I request same url

I want to call request when user click button. But when first request not response , user want to change parameter and call new request with same url. Problem How to cancel first request and call new request with same url. ServiceFactory …
0
votes
0 answers

Get the index of first match in the List and add an object before the index using rxjava

I have a List of objects in Java, I want to insert an object at index - 1 of the first matched object. How do that using RXJava? I have read Observable.first() but it only get me the first matched object, no index. Thus, I have no reference of where…
Salis
  • 179
  • 1
  • 20
0
votes
1 answer

doOnNext() never called

Given the following chain: public Observable> findPoiCollectionsByUserId(Integer userId) { return findUserGroupsByUserId(userId) .flatMapIterable( userGroups -> userGroups) …
John Smith
  • 752
  • 9
  • 35
0
votes
1 answer

Return Observable from an object of SongResponse that contains a List

I have a class SongResponse: public class SongResponse implements Parcelable { @SerializedName("token") public String token; @SerializedName("items") public List songList; } @GET("songs") Observable
luoihocbk
  • 13
  • 5
0
votes
2 answers

Merge two observables when Obs B depends on Obs A

I have two repository classes, repository A a List of Competitions as an Observable>. My Competition class has a countryId. I also have a repository B, which returns either a List of countries as an Observable> or a single country by Id as a…
M Rajoy
  • 4,028
  • 14
  • 54
  • 111
0
votes
1 answer

Android rxJava2 project structure, file naming, etc

I have an Android project that currently doesn't use View Models or rxJava. It's a fairly straightforward app that uses the Parse sdk with a parse-server. It's still early in the project and I've decided to start using VM and rxJava. My question…
MayNotBe
  • 2,110
  • 3
  • 32
  • 47
0
votes
1 answer

Handle the status of JSON by Retrofit call

I want to process JSON output from Rest call based on the status. So what will be the required approach? Here is my method from RetrofitApi class @POST("KeepHoldTisConfirmation") Observable putHoldTis(@Body ResultOutput body); Here is…
user2582324
  • 1,220
  • 1
  • 9
  • 10
0
votes
1 answer

Updating Image upload complete status in database using retrofit and rxjava

I am using Rxjava in conjunction with Retrofit. I want to update status of that image as completed in android database. So the real question is what if second image is uploaded first and after that first is uploaded?. Is onNext() is called…
user2582324
  • 1,220
  • 1
  • 9
  • 10
1 2 3
99
100