tree: a8c6632f48c3dceccf23e82e71ce1fd1c5bf8bd8 [path history] [tgz]
  1. api/
  2. src/
  3. test/
  4. build.gradle
  5. package.list
  6. README.md
integration/kotlinx-coroutines-play-services/README.md

Module kotlinx-coroutines-play-services

Integration with Google Play Services Tasks API.

Extension functions:

NameDescription
Task.awaitAwaits for completion of the Task (cancellable)
Deferred.asTaskConverts a deferred value to a Task

Example

Using Firebase APIs becomes simple:

FirebaseAuth.getInstance().signInAnonymously().await()
val snapshot = try {
    FirebaseFirestore.getInstance().document("users/$id").get().await() // Cancellable await
} catch (e: FirebaseFirestoreException) {
    // Handle exception
    return@async
}

// Do stuff