Created
October 7, 2021 20:08
-
-
Save vestrel00/26392c08690f541d3c0bd840c557610b to your computer and use it in GitHub Desktop.
CREATE/INSERT a contact with a name of "John Doe" who works at Amazon with a work email of "[email protected]", Kotlinized
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
val insertResult = Contacts(context) | |
.insert() | |
.rawContact { | |
setName { | |
givenName = "John" | |
familyName = "Doe" | |
} | |
setOrganization { | |
company = "Amazon" | |
title = "Superstar" | |
} | |
addEmail { | |
address = "[email protected]" | |
type = Email.Type.WORK | |
} | |
} | |
.commit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment