Questions tagged [rx-java]
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences
26 questions
2
votes
0
answers
243
views
How to implement a single-value cache in RxJava 3?
Kotlin 1.3.+
RxJava 3.0.+
Kotest 4.1.+
...
2
votes
1
answer
67
views
Class for user actions
I implemented a class for relationships with the user (deletion, name change, check for existence), I created this class to remove extra logic from the activity class. Could you talk about how my code ...
3
votes
0
answers
1k
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
0
answers
84
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.
...
4
votes
2
answers
167
views
Parsing CAN frames from a ByteArray
Here's my method used for parsing a ByteArray into multiple frames of CAN interface. It works now correctly but it's somewhat ugly in my opinion.
It's written in ...
0
votes
1
answer
229
views
Async Task using RxJava2 in Android
I have tried to create the async task using the RxJAVA2. The code is working fine. WHat enhancement can I do in this code?
...
2
votes
1
answer
489
views
About handling data from an API call through RX and Retrofit
I started using Retrofit and RxJava recently and I love it. I am working on an Android project and I am following MVP Repository pattern as specified in Android Architecture Components. I'm still ...
3
votes
1
answer
160
views
Getting products for category
I have a PR for a bugfix in which the fix is just 4 characters. In this situation we are invited to make some refactoring on the class that we are touching if possible.
Venkat Subramaniam's advice is ...
0
votes
1
answer
223
views
Dagger 2 test application
I have a complicated Dagger 2 use case on Android, where I have a lot of dependencies, but some of them are really slow to construct. Like 2-3 seconds slow.
My solution was to create an RX ...
3
votes
0
answers
963
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
0
answers
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 ...
2
votes
0
answers
64
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. ...
4
votes
1
answer
205
views
Creating new async tasks
In the past, I have used AsyncTasks to perform network requests for my Android app. I recently switched to RxJava to be able to cancel the requests when the user exits an activity. I have created a ...
5
votes
0
answers
165
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 ...
2
votes
0
answers
89
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 ...