Is there an efficient query to find all aggregate contacts for a specific account name & type?
The ContactsContract.Contacts
table has the IN_VISIBLE_GROUP
column which is effective for contact group membership. So, if the user has selected various group memberships for accounts, this column will be set.
There does not appear to be any equivalent in-visible-account column. However, the Android contacts app allows selecting a specific account to view without tapping "customize" and selecting groups. Doing this updates the ContactsContract.Settings
table. The effect does not appear to reach the Contacts
table.
I would like to be able to do one query and get one cursor back that has exactly the right set of aggregate (meaning from the Contacts table) contacts. Is this possible?
Contacts
are account specific, they're combined of multipleRawContacts
, each can be saved on a differentAccount
.You can query for all the
RawContacts
for a specificAccount
:If you want
Contacts
you can put all contact-ids you found in the above query in an array, and query onContacts
table: