Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CREATE/INSERT a contact with a name of "John Doe" who works at Amazon with a work email of "john.doe@amazon.com", Kotlinized
val insertResult = Contacts(context)
.insert()
.rawContact {
setName {
givenName = "John"
familyName = "Doe"
}
setOrganization {
company = "Amazon"
title = "Superstar"
}
addEmail {
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