Skip to content

Instantly share code, notes, and snippets.

@vestrel00
Last active December 8, 2021 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vestrel00/a5792701dc42ae9aa976e52a9757ebb0 to your computer and use it in GitHub Desktop.
Save vestrel00/a5792701dc42ae9aa976e52a9757ebb0 to your computer and use it in GitHub Desktop.
The Contacts, Reborn library provides Kotlin coroutine extensions for all API functions to handle permissions and executing work in background threads
launch {
val contacts = Contacts(context)
.queryWithPermission()
...
.findWithContext()
val deferredResult = Contacts(context)
.insertWithPermission()
...
.commitAsync()
val result = deferredResult.await()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment