How to lock the wire until the Observable is complete

I'm testing a scenario, where i want to send an event, and watching when the consumer finishes processing to continue the flow, ie when i trigger the event, i need that main thread to be blocked until the end of the consumer processing , using rxJava

Get an object inside each call Redevelopment

i'm using Retrofit and RxJava to integrate with an API every api response is like that: {"success":true,"message":null,"object":{"bla":"String", "bla1":1}} And the only thing that change is the o

Several Android apito calls using RxJava

I have list of object which are sent as body for post request in each api call. All post request should be run in parallel. For each request it should notify that either it is success or failure and once all post request completes it should notify. H

Can we use Retrofit, RxJava, RxAndroid together?

I have used: compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'io.reactivex:rxandroid:1.2.1' compile 'com.squareup.retrofit2:retrofit compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' Should i use like this way, i read retrofit 1.x itself

Unit test - Check that the Observable is subscribed

I have got the java code like this mDataManager.getObservable("hello").subscribe( subscriber ); and I want to verify the following Observable is being .subscribe() I have tried to mock getObservable() and verify Observable<Response> res =

GoogleApiClient must not be null [Awareness API]

I'm trying to find out why the Google Play Services is crashing with a nullpointerexception after the application is coming back from a background state such as device sleep or toggle other program. Sometimes Google Play Services gives the crash popu

RxJava associating Observables for more than one query

I have some problems in my rx vs retrofit architecture. I have Observable<SignUpServerCode> signUp(@Body AccountSignUpRequest signUpRequest) that makes request to server for registration. Server return me SignUpServerCode in which I have parameter c

RxJava collect () & amp; takeUntil ()

I have a list of users of unknown size. What i want is to query first 30 and update UI. Then i want to query all others by offset with step of 100 until i get last pack of users - should i use takeUntil here?) and when i get - i update UI by adding r

Schedulers.io creates hundreds of RxCachedThreadSchedulers

I use RxJava in my android app and it ran into OutOfMemoryError several times. I checked it with Device Manager and I just noticed, that I have more, than 200 threads, most of them in wait state and usually those are RxCachedThreadSchedulers. The OOM

How to Observe Network Changes in RxAndroid

I'm using the code given here. I put those code blocks as classes in my project's util package. And then in the main activity class I wrote this.. class MenuActivity { // Variable declaration private final CompositeSubscription mConnectionSubscriptio

RxAndroid: UI changes to Schedulers.io () thread

I have simple job on IO thread which is changing home screen wallpaper, after that I'm trying to run some animation on UI thread: AppObservable.bindFragment(this, Observable.just(0)) .observeOn(Schedulers.io()) .subscribe(v -> setWallpaperOnSeparateT

RxScala: How to keep the thread running.

I am trying to write a simple RxScala program: import rx.lang.scala.Observable import scala.concurrent.duration.DurationInt import scala.language.{implicitConversions, postfixOps} object Main { def main(args: Array[String]): Unit = { val o = Observab

RxJava Android Join Lists

Trying to understand all that RxJava stuff. I was doing following example: private Observable<List<String>> query1() { List<String> urls = new ArrayList<>(); urls.add("1"); urls.add("2"); urls.add("3")

RxJava Observable and Subscribed for Jump Exception?

If I have an Observalbe : List<Integer> ints = Lists.newArrayList(1, 2, 0, 3, 4); Observable<Integer> o1 = Observable.from(ints); I want to generate another observable , which divide by 12 : Observable<Integer> o2 = o1.map(i -> 12/i);

What is the difference between an observer and a subscriber?

I am trying to decipher the following function: Subscription getCar(id, Observer<Car> observer) { return getCarDetails(id, new Observer<CarDetails> { @Override onNext(CarDetails details) { observer.onNext(details.getCar()); } }); } I got a goo

Get header information with RXJava and retrofit

I'm trying to convert my app which currently uses Retrofit, to use RX Java. In order to handle Pagination, I traditionally was grabbing the nextPage URL from the response headers. @Override public void success(Assignment assignment, Response response

Wait for parallel RX subscribers to complete

I'm looking for the best method to wait for async tasks to finish in rx-java. As a common example say there is a function which gets a list of id's from a local store and then queries a remote system for those Id's, the remote system results are then

Rx Periodically observable emitting values

I have to poll some RESTful endpoint periodically to refresh my android app's data. I also have to pause and resume it based on connectivity (if the phone is offline, there's no need to even try). My current solution is working, but it uses standard