Hi, I want callbackflow to be shared between subsc...
# flow
a
Hi, I want callbackflow to be shared between subscribers. I see solutions using shareIn for example - https://barbeau.medium.com/kotlin-callbackflow-a-lightweight-architecture-for-location-aware-android-apps-f97b5e66aaa2. But I would like to avoid an external coroutinescope for shareIn. Is there any solutions which relies on a combination of scopes of the subscribers?
n
No, you need the separate scope. The shared coroutine can't run directly in either subscriber scope, so it must have its own independent scope.
a
At the moment I took an injected scope from the Repository.