Questions tagged [rx-java3]

149 questions
1
vote
1 answer

PublishSubject `subscribeOn` behavior

Why is the subscribe never printing anything here? Just out of curiosity. This is bad practice anyways: I would normally use observeOn instead. However, I can't figure out why the subscribe is never reached... val subject: PublishSubject =…
ExpensiveBelly
  • 444
  • 5
  • 8
1
vote
1 answer

Vertx RxJava Operator iteration not filtering the content

I am reading the content from file, I put some name into the file with new line separator but while reading the file by vertx file-system I am not able to provide the required filter. every-time it print all the data of file. Here is the code…
Ravat Tailor
  • 1,193
  • 3
  • 20
  • 44
1
vote
1 answer

Delay Element in RxJava Flowable

There is a very intuitive operator named delayElements available in the @ProjectReactor publisher Flux to introduce a delay between each element emitted. Say, for example, following cod emit an element per second. Flux.fromIterable(List.of(1, 2,…
Sanju Thomas
  • 181
  • 2
  • 10
1
vote
1 answer

RxJava: how to make code working asynchronously?

Please, coorect me if I wrong in my conclusions about async work and give any suggestions how to make this work asynchronously. This code performs setting result of calculations in grid cells. As I assume asynchronous work should display grid cells…
white-imp
  • 313
  • 2
  • 16
1
vote
1 answer

RxJava: how to unsubscribe a subject from an observable

Using RxJava3, given an Observable and a Subject, I can subscribe the Subject to the Observable: observable.subscribe(subject); // returns void, not a subscription Later, my Subject is not interested anymore in the Observable, how to unsubscribe it…
Fabien
  • 549
  • 7
  • 22
1
vote
1 answer

Can't migrate accurately from RxJava2 to RxJava3

I can't convert this method to RxJava3 despite having upgraded the dependencies fun setSearchField(searchField: EditText) { searchDisposable = searchField.afterTextChangeEvents() .skipInitialValue() .debounce(400,…
Kred
  • 319
  • 3
  • 12
1
vote
2 answers

(Scala + RxJava3) Flowables.orderedMerge NoSuchMethodError

In Ammonite, I execute the following codes... Trying to do an orderedMerge of two Flowables, import $ivy.{ `io.circe::circe-generic:0.13.0` , `io.circe::circe-parser:0.13.0` , …
Anibal Yeh
  • 349
  • 1
  • 11
1
vote
1 answer

Error in executing AndroidSchedulers.mainThread()

I have a fragment In which I have implemented some code : public void onViewCreated(@androidx.annotation.NonNull View v, @Nullable Bundle savedInstanceState) { super.onViewCreated(v, savedInstanceState); button =…
Pranav Choudhary
  • 2,726
  • 3
  • 18
  • 38
1
vote
1 answer

RxJava PublishSubject with and without ObserveOn

I have three Integer observers like below : First Observer : private Observer getFirstObserver() { return new Observer() { @Override public void onSubscribe(Disposable d) { } …
Abhishek Luthra
  • 2,575
  • 1
  • 18
  • 34
1
vote
0 answers

Android Twitter API statuses/filter with Retrofit + RxJava: never hits onNext or onError

I try to consume the Streaming API from Twitter: statuses/filter as the following link(1) (1)https://stream.twitter.com/1.1/statuses/filter.json?track=twitter Docs:…
davthecoder
  • 689
  • 1
  • 6
  • 20
1
vote
3 answers

RxJava: Skip all the errors in fromIterable() and notify subscriber when all the items are emitted - Flowable.parallel execution

I have an API call which verifies some status against an "Id". The API returns Single or error. I have a list of such Id's, Only one Id is valid to return success or none (all id's return error). What I need is, Iterate through each Id and skip the…
android_user
  • 91
  • 1
  • 4
1
vote
0 answers

RxJava method conversion to RxJava3

this is a method written in RxJava public Observable method() { return model.getOffers() .filter(new Func1() { @Override public Boolean call(Offers offers) { …
Dionis
  • 11
  • 2
1
vote
0 answers

RxJava `switchOnNext` with infinite streams

I am trying to write a simple example that uses the switchOnNext operator. I want to generate an infinite stream of infinite streams. EAch individual stream will generate from 1 to infinity. Using switchOnNext I would expect that each observable…
Christophe De Troyer
  • 2,852
  • 3
  • 30
  • 47
0
votes
0 answers

If you cancel/dispose DisposableSubscriber, onComplete event is not called

Using this code: Disposable d = Flowable.range(1, 5) .subscribeWith(new DisposableSubscriber() { @Override public void onStart() { …
Doua Beri
  • 10,612
  • 18
  • 89
  • 138
0
votes
0 answers

Sometimes not receiving flowable updates if room update happens immediately after insert

I am using room with rxjava and I have one database with 2 tables. The former table has fields id and status, where status can be 0 or 1. The latter has a foreign key which is the id from table 1. In DAO part, the insert into the latter and the…
fstfn
  • 1