https://kotlinlang.org logo
#android
Title
# android
o

Orhan Tozan

04/23/2021, 2:40 PM
In a Fragment collecting a UI state Flow, which one of the scope methods do you use? 1️⃣`launch {}` 2️⃣`launchWhenCreated {}` 3️⃣`launchWhenStarted {}` 4️⃣`launchWhenResumed {}`
4️⃣ 2
2️⃣ 2
1️⃣ 8
3️⃣ 12
j

Javier

04/23/2021, 2:41 PM
I am transforming it as liveData until the new APIs are stable. In my projects I would use the new APIs same post (sorry XD): https://medium.com/androiddevelopers/a-safer-way-to-collect-flows-from-android-uis-23080b1f8bda
👍 1
So, maybe adding
someFlow.asLiveData()
to option 5️⃣