New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add firebase database module #62
Comments
I really hope somebody contributes the corresponding integration. See this document on how to contribute: https://github.com/Kotlin/kotlinx.coroutines/blob/master/integration/README.md |
There is an implementation in this gist made by @beyondeye. Maybe a module can be written with that code. Renaming some functions and changing their signatures to be extension functions that code would look like this. @Test
fun `Can write and read from Firebase Database`() = runBlocking {
val database = FirebaseDatabase.getInstance()
val messageNode = database.getReference("message")
messageNode.writeValue("Hello World") // suspend function
val message = messageNode.readValue(String::class.java) // suspend function
assertEquals("Hello World", message)
} There are other methods implemented, but I couldn't write tests for them yet. Also I'm not so familiar with coroutines yet. |
I think an upgrade to this topic should be transferred to this now. |
Firebase DB on Android could use some suspend extensions.
The text was updated successfully, but these errors were encountered: