4,135 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
36
views
What is the idiomatic use of HiveMQ client's `subscribePublishes` method
I cannot figure out how to use the FlowableWithSingle<Mqtt5Publish,Mqtt5SubAck> subscribePublishes(Mqtt5Subscribe subscribe) method of the HiveMQ Rx client API. It returns FlowableWithSingle ...
wilx's user avatar
- 18.3k
0
votes
0
answers
39
views
RxJava BehaviorSubject.onNext() is called but subscriber is not receiving updates
I am trying to implement background polling in an RxJava-based Android application where:
A repository periodically fetches data from an API every 10 seconds and emits updates via a BehaviorSubject.
...
0
votes
1
answer
38
views
How to cancel the Flowable upstream's block logic when a TimeoutException throws
I have a rxjava2 code, like below:
public class Demo {
/** @noinspection ResultOfMethodCallIgnored*/
@SuppressLint("CheckResult")
public static void test() {
Flowable....
0
votes
2
answers
83
views
Fire and forget coroutine job
Here is a the actual code in Rxjava. Its a fire and forget database operation
fun saveResponseToDb() {
Observable.just(database)
.subscribeOn(Schedulers.io())
.observeOn(...
-1
votes
1
answer
54
views
RxJava strip bytes at regular interval from a stream and then further extract messages based on length indicator of message bytes
I have a Java inputstream, that I skip 2 bytes every n bytes. Now the output of that are bytes that are clean after stripping the 2 delimiters every n bytes.
This output is a series of bytes where the ...
0
votes
1
answer
104
views
How to trigger recomposition when observing LiveData
I'm migrating an app from views to compose and am trying to trigger a schedule update every five minutes in which if there is a change in the data compose should recompose. Still using RxJava in my ...
0
votes
1
answer
34
views
Getting Compilation Failure "cannot find symbol for concatMap" in the RxJava Code
I am new to this RxJava coding language.
I am trying to write a function that recursively copies files from one S3 location and pastes the content to another S3 location.
Here is the code that I have ...
0
votes
1
answer
887
views
IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet
Assume simplfied class like:
class MyModel() {
companion object
val number = mutableStateOf(0)
init {
refresh()
}
fun refresh() {
RestClient.getNumber()
...
2
votes
0
answers
46
views
Where do I put the Disposable for RxJava?
I'm using RxJava2 and subscribing to my data streams with a CompositeDisposable variable. I'm familiar with codebases having the disposable in the Fragment/Activity, but I'm not entirely sure why that ...
1
vote
1
answer
75
views
RxJava PublishSubject buffer elements with timeout
I want to achieve the following with RxJava:
Buffer elements and publish them when 5 seconds passed after the last element
Publish buffered elements in 20 seconds passed after the first element
...
0
votes
1
answer
30
views
adjust delay value in rx java from source
I'm new to Rxjava and could not find an example or appropriate usage of single.delay() that uses the result of the previous flatmap as the delay. My aim is to use the result of functionOne() to set ...
0
votes
1
answer
57
views
retryWhen hanging after migrating from rxjava to rxjava2
We have the following methods which we have recently migrated from rx-java to rx-java2:
@Override
public Observable<FooResponse> doFoo(String id) {
return api.doFoo(id)
.map(Response::...
0
votes
1
answer
32
views
How to update the first observable with the data of the second dependent on the first
In Android using Retrofit combined with RxJava I get an object Observable. Inside I have a List; inside Table I have properties containing a foreign key from the object Product.
My goal is to get the ...
0
votes
0
answers
77
views
RxJava2 onNext can't execute after FlowableEmitter.onNext executed many times
I called the Flowable.create to implement that loop read data from bluetooth sockete InputStream, I try the below pseudocode to implement this.
// connectBluetoothFlowable is a Flowable<Boolean>
...
0
votes
0
answers
41
views
Android: NPE: Observable.takeLast
I set up some observables like so
companion object {
var isLocationToolActive: BehaviorSubject<Boolean> = BehaviorSubject.createDefault(false)
var isAoIToolActive: ...