1. When creating a `StateFlow` with `stateIn` , a...
# android
j
1. When creating a
StateFlow
with
stateIn
, and you want the flow producer to be active all the time (even when the app is in the background), what coroutine scope should be used? 2. When observing to the above
StateFlow
, even though the flow producer would live forever, can you still use
repeatOnLifecycle
in the UI to safely unregister?
g
1. GlobalScope or some own scope which you create on app creation 2. Yes
❤️ 1
j
thank you 🙌