Gabor Varadi
1 min readMay 23, 2020

--

Nice article. Do you by chance know how to imitate `onActive()` and `onInactive()` callbacks from LiveData? For example, to wrap a reactive data source (register listener when you have active observers, unregister listener when you don't), and still be able to retrieve latest value from the flow if needed?

--

--

Gabor Varadi
Gabor Varadi

Written by Gabor Varadi

Android dev. Zhuinden, or EpicPandaForce @ SO. Extension function fan #Kotlin, dislikes multiple Activities/Fragment backstack.

Responses (4)