Last active
December 8, 2021 01:34
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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