Last active
October 10, 2021 00:30
-
-
Save vestrel00/0f3c3444ba1953ad53d7ed4b5fe8dd5a to your computer and use it in GitHub Desktop.
You have full access to all contacts and their data
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
Log.d( | |
"Contacts", | |
contacts.joinToString("\n\n") { contact -> | |
""" | |
ID: ${contact.id} | |
Display name: ${contact.displayNamePrimary} | |
Display name alt: ${contact.displayNameAlt} | |
Photo Uri: ${contact.photoUri} | |
Thumbnail Uri: ${contact.photoThumbnailUri} | |
Last updated: ${contact.lastUpdatedTimestamp} | |
Starred?: ${contact.options?.starred} | |
Send to voicemail?: ${contact.options?.sendToVoicemail} | |
Ringtone: ${contact.options?.customRingtone} | |
Aggregate data from all RawContacts | |
----------------------------------- | |
Addresses: ${contact.addressList()} | |
Emails: ${contact.emailList()} | |
Events: ${contact.eventList()} | |
Group memberships: ${contact.groupMembershipList()} | |
IMs: ${contact.imList()} | |
Names: ${contact.nameList()} | |
Nicknames: ${contact.nicknameList()} | |
Notes: ${contact.noteList()} | |
Organizations: ${contact.organizationList()} | |
Phones: ${contact.phoneList()} | |
Relations: ${contact.relationList()} | |
SipAddresses: ${contact.sipAddressList()} | |
Websites: ${contact.websiteList()} | |
----------------------------------- | |
""".trimIndent() | |
} | |
) | |
// There are also aggregate data functions that return a sequence instead of a list. | |
// Each Contact may have more than one of the following data if the Contact is made up of 2 or more RawContacts; | |
// name, nickname, note, organization, sip address. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment