D
D
Drottarutarnum2019-09-24 15:44:02
Java
Drottarutarnum, 2019-09-24 15:44:02

How to unsubscribe in RxJava inside a Consumer?

I have a class that sends status messages to all its subscribers 20 times per second
. And if the device goes from the Run state to the End state, you need to switch the activity
. the condition is met, the Consumer performs a transition to another activity 20 times per second, constantly.
Therefore, I need to somehow unsubscribe, how can this be done inside the Consumer itself?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question