Stumbled upon this today when trying out firebase ...
# coroutines
c
Stumbled upon this today when trying out firebase for the first time. https://github.com/Kotlin/kotlinx.coroutines/tree/master/integration/kotlinx-coroutines-play-services Why does kotlin have google play services intergration? Vs the opposite (play services having coroutine support)? Mostly curious if this is something I could seriously adopt or if its just experimental from kotlin team.
o
1. I think the reason why Kotlin decided to make the google play services coroutines integration themselves is because it is in their interest for people to use coroutines, thus want to encourage coroutines use 2. It is not experimental, using it in production for almost 2 years
c
@Orhan Tozan thanks. Glad to know someone else who is using it. Do you also use it for snapshot listeners in firestore? Basically, suspend functions make sense for one shot get requests, but what about observing a stream? Have you had luck with that?
o
Never used Firestore on Android, only used it with Firebase auth. I don't know if they also wrapped the streams with flows. If not, you have to wrap it yourself with callbackFlow
c
Got it. I have to implement firebase auth also so that helps that I can use it there.
o
Perhaps a relevant library for you: https://github.com/GitLiveApp/firebase-kotlin-sdk
c
Sweet thanks!