https://kotlinlang.org logo
#coroutines
Title
# coroutines
a

ahulyk

07/25/2019, 2:47 PM
Channel/Flow support is missing for Room right now? Right?
t

tseisel

07/25/2019, 2:52 PM
Yes. Would be nice to have
Flow
integration in a future release of Room. For now, we can convert `Observable`/`Flowable` to
Flow
with
asFlow()
to achieve the same result.
but, you could probably wrap up the coroutine support that room has with your own channel/flow
or...just use LiveData
i

Icaro Temponi

07/25/2019, 2:57 PM
There's an ongoing PR to add first-class Flow support to DAO methods on Room: https://android-review.googlesource.com/c/platform/frameworks/support/+/944458 Now that the core Flow API has reached stable on 1.3-RC it shouldn't take long for it to be implemented
🎉 11
a

Adam Powell

07/25/2019, 3:09 PM
Yeah we'd like to get this merged asap
a

ahulyk

07/25/2019, 6:11 PM
LiveData can be easy converted to Flow
j

Joaquim Ley

07/26/2019, 8:15 AM
Only issue I had with LiveData is it emits null when you observe, but yes with Kotlin is fairly easy 🙂
No one said otherwise, but yes I agree.
r

rkeazor

07/26/2019, 12:18 PM
Yea actually I misspoke lol. Just wanted to point there is a fundamental difference. Is there a timeline when Flow will reach stable?
😅 1
t

tseisel

07/26/2019, 12:51 PM
@rkeazor The time is now !
Flow
has reached the stable status since 1.3.0-RC. Only some recent operators are still experimental.
7 Views