DEV Community

Discussion on: Using Kotlin Extension Functions and Coroutines with Firebase

Collapse
 
adamshurwitz profile image
AdamHurwitz • Edited

This is extremely useful for one-time requests such as Callbacks like 'addOnCompleteListener'.
For realtime updates I looked further into the 'suspendCancellableCoroutine' to build a simple pattern for realtime updates like 'addSnapshotListener'. I outlined the pattern in this StackOverflow post.

GitHub Post - stackoverflow.com/a/58786712/2253682