Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An advance contacts query using
val contacts = Contacts(context)
(Fields.Name.GivenName startsWith "leo") and
((Fields.Email.Address endsWith "") or (Fields.Email.Address endsWith "")) and
(Fields.Address.Country equalToIgnoreCase "us") and
((Fields.Event.Date lessThan Date().toWhereString()) and (Fields.Event.Type equalTo Event.Type.BIRTHDAY)) and
(Fields.Contact.Options.Starred equalTo true) and
(Fields.Nickname.Name equalTo "DarEdEvil") and
(Fields.Organization.Company `in` listOf("facebook", "FB")) and
Account("", ""),
Account("", "com.myspace"),
.include(Fields.Contact.Id, Fields.Contact.DisplayNamePrimary, Fields.Phone.Number, Fields.Phone.NormalizedNumber)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment