I’ve created a custom sync adapter, but every time I delete a contact using that adapter (when a contact is deleted on the server, for example), it also deletes all aggregate contacts from other accounts. Currently, I just use the ContentResolver.delete(...) method. Is there a way to specify that I donly want to delete my custom account’s contact?
I’ve created a custom sync adapter, but every time I delete a contact using
Share
Nevermind, I figured it out — by default, Android aggregates all the contacts, so when I delete one of my custom synched contacts, the contact ID matches all the other aggregate contacts, and that’s why they were being deleted. If I tell the contact not to be aggregated when ti’s being added by the sync adapter by using
.withValue(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_DISABLED), then all my custom contacts can be deleted by themselves