Questions tagged [rx-java3]

149 questions
0
votes
1 answer

Flowable to perform task and return List of String Rx Java ReactiveX

Perform task and finally return the value using Flowable rxjva3. I have below code public Maybe> uploadObject(Publisher images) { Storage storage = StorageOptions.getDefaultInstance().getService(); …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

Convert Publisher to Maybe>

I have the below method public Maybe> post(Publisher files) { MultipartBody.Builder requestBody = MultipartBody.builder(); return Flowable.fromPublisher(files).flatMap(file -> { …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

Do then and finally with Flowable reactive x Java

Trying to use Flowable, do then, and finally using RxJava3. public String post(Publisher files) { return Flowable.fromPublisher(files).doOnNext(file -> { MultipartBody requestBody = MultipartBody.builder() …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
2 answers

RxPermissions not called after permission granted

I'm using RxPermissions to handle permissions inside my project. 'com.github.tbruyelle:rxpermissions:0.12' 'io.reactivex.rxjava3:rxjava:3.0.4' This is my code for handling the CAMERA permission: new RxPermissions((FragmentActivity)…
0
votes
0 answers

What is/ how to select "prefetch" for parallel flowable?

I was reading the parallel flows documentation here and it mentioned: By default, the parallelism level is set to the number of available CPUs (Runtime.getRuntime().availableProcessors()) and the prefetch amount from the sequential source is set to…
Ben Butterworth
  • 22,056
  • 10
  • 114
  • 167
0
votes
1 answer

rxjava, how to inspect the result of a Single

using kotlin, having code fun fetchRemoteDataApi(): Single = networkApi.getData() // it is just a retrofit @GET(".../api/getData") fun getData() : Single fun mergeApiWithDb(): Completable =…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

Unit tests involving MockWebServer fails with Auth0's Android library version 2

We upgraded our Auth0 Android library from 1.30 to 2.0 and some of our unit tests that use OkHttp's MockWebServer broke. The first test fails with a java.lang.ExceptionInInitializerError which in turn is caused by java.lang.RuntimeException: Method…
Alvin Dizon
  • 1,855
  • 14
  • 34
0
votes
1 answer

rxJava how to make sequential call while being able to acess previous parameter

This is the flow I need to follow to create a file record in my server Black arrow is flow Red arrow is dependency This is one big function I need help designing this in rxjava that make them happen sequentially while the later single is able to…
BabyishTank
  • 1,329
  • 3
  • 18
  • 39
0
votes
1 answer

Slowing down RxJava3 Flowable with Resilience4j RateLimiter

I've tried the Resilience4J example, but the rate limiter does not seem to obey my demands: @Test public void simpleReactiveWithRateLimiter() { RateLimiterConfig rateLimiterConfig = RateLimiterConfig.custom() .limitForPeriod(5) …
Darek
  • 4,687
  • 31
  • 47
0
votes
1 answer

Thread execution of value emitting code and value receiving code in RxJava

I have following code: private static void log(Object msg) { System.out.println( Thread.currentThread().getName() + ": " + msg); } Observable naturalNumbers = Observable.create(emitter -> { …
Mandroid
  • 6,200
  • 12
  • 64
  • 134
0
votes
0 answers

Single.concatDelayArray and .firstOrError() operator

I have a case in my app where I want to fetch from multiple sources and return first valid data. I'd think .concatDelayArray() and .first() would be valid choices for this, but using them causes a crash if any of the non-last Singles throw an…
Tomislav Turcic
  • 879
  • 1
  • 11
  • 24
0
votes
0 answers

Mapping the return type of subscribe to other type

Map the return type in RXJava @Queue(ProductTopicConstants.DELETE_PRODUCT) public Single Delete(String id) { LOG.info(String.format("Listener --> Delete the document from the database")); ProductSearchCriteria criteria =…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
0 answers

Single.fromPublisher subscribe and map to the return type reactivex java

Using reactivex to map and return the value from the method as below public Single Create(ProductViewModel model) { Product product = new Product(); product.setName(model.getName()); …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

How to subscribe multiple Observers on a single Observable with RxJava?

I have an Observable> and I want this Observable to be shared by multiple Subscribers. Each Subscriber will filter each Event and process it. The Observable> has been created this way : @Override public List
Lovegiver
  • 413
  • 6
  • 22
0
votes
1 answer

How to notify the obsever when list changes in Rxjava

I have class three classes. Pref, ClassA, and ClassB. public class Pref{ public static ArrayList prefList; public static Observable> observable; public static void loadData(){ prefList = getFromDb(); …
Pranjal Choladhara
  • 845
  • 2
  • 14
  • 35
1 2 3
9
10