Last active
December 18, 2021 02:00
-
-
Save vestrel00/2d1e716587de104d7ba0d46923c6a353 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 "john.doe@amazon.com"
This file contains 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() | |
.rawContacts(NewRawContact().apply { | |
name = NewName().apply { | |
givenName = "John" | |
familyName = "Doe" | |
} | |
organization = NewOrganization().apply { | |
company = "Amazon" | |
title = "Superstar" | |
} | |
emails.add(NewEmail().apply { | |
address = "john.doe@amazon.com" | |
type = Email.Type.WORK | |
}) | |
}) | |
.commit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment