Questions tagged [rx-java]

RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
120 views

User role Observable

I have a service with these methods: Observable<User> getUsers(); Observable<Role> getUserRoles(String userId); For each user, I want to get her ...
3
votes
0answers
491 views

Android+Firebase testing using Mockito

I have an interactor/usecase class in my application. My application follows MVVM architecture with interactor/usecases responsible for logic (e.g. get data from api-service, store in local-database ...
3
votes
0answers
913 views

RxJava2 custom Observable

I'm trying to understand how to bridge receiver-based events to the Reactive world. I asked a question on SO and was pointed to a different approach. The author of that answer (David Karnok) is ...
3
votes
0answers
2k views

Repository pattern with Specification queries

I'm working on an Android (Java) project which utilizes different analytic metrics (sum of x group by date, sum of x group by id, etc) and I am projecting the data sets into different charts using ...
3
votes
0answers
543 views

Using combinations of OR and AND filters with RxJava

I'm trying to work out a way to create a combination of OR and AND filters in RxJava. Here's what I've done so far: ...
2
votes
0answers
19 views

How to implement a single-value cache in RxJava 3?

Kotlin 1.3.+ RxJava 3.0.+ Kotest 4.1.+ ...
2
votes
0answers
56 views

Listing YouTube videos using API with RxJava

I am new to RxJava and have the following code which I use to search YouTube videos via the API and ultimately display them in a list. ...
2
votes
0answers
46 views

Asynchronous service that publishes a possibly infinite amount of events

I want to implement a service that fetches eyetracking events and publishes them to all subscribers of the stream. The whole thing is supposed to run asynchronously, so it doesn't block the UI thread. ...
2
votes
0answers
70 views

Refactoring App launch sequence using reactive programming

In the SplashActivity of my Android Application, the following sequence of events occur: Check if Google Play Services is installed If Google Play Services are ...
1
vote
0answers
62 views

Consuming APi using Rx in an MVP project

I would like to have some input here if possible, this code should make a request to an API and the call should return the desired object. The client to make the requests was made with Retrofit and ...
1
vote
0answers
22 views

Conditionally perform asynchronous actions with RxJava

This seems to work fine however I'm sure there must be a neater way. The outcome should be: If isHidden == true then call canHideAccount. canHideAccount returns a Single. If isHidden != true then ...
1
vote
0answers
75 views

Pushing a value to a Processor on a separate thread

I am attempting to use Room along with a full-text search (FTS) table. The issue is that Room doesn't recognize or support FTS tables. Though there is a work around for this; you just create the FTS ...
1
vote
0answers
78 views

Subscribing to multiple sources in RxJava

I have used RxJava to Observe multiple sources and then perform action depending upon values of Observables. I want to know if it can be further simplified. Goal: Complete implementation of RxJava. ...
1
vote
0answers
47 views

Code which buffers objects and schedules saving them from buffers, after applied some actions to it

Originally i have a function like this: ...
1
vote
0answers
285 views

My first use of RX-java with Kotlin and vertx

I extracted a small part of my project, it is a workflow engine based on vertx rx-java and Kotlin. This part represent the code use to manage Bpmn Service task. The workflow is a stack of ServiceTask ...
1
vote
0answers
48 views

Testing a method which coordinates multiple objects

I have this class with one method, which uses three different objects to perform a task. ...
0
votes
1answer
93 views

Finding the mean using RxJava

I'm learning RxJava and this is what I attempted to find the mean of 'n' transactions. ...