alexstyl / contactstore

A modern, strongly-typed contacts API for Android.
https://alexstyl.github.io/contactstore
Apache License 2.0
440 stars 15 forks source link

Provide account information on items returned from ContactStore #49

Closed alexstyl closed 2 years ago

alexstyl commented 2 years ago

A Contact can contain data from different accounts synced on the device.

As multiple accounts might be containing the same data (such as WhatsApp duplicating phone numbers as seen in https://github.com/alexstyl/contactstore/issues/11), it is important to provide a way for the consumers of the API to be able to identify the source of each data item.

This PR introduces the ContactAcount property in each LabeledValue. Internally, the ContactStore will now query the Entity directory instead of Data in order to find all information aggregated for each contact. Because of this change, there is no need to query for specific 3rd party accounts anymore and the LinkedAccountValues column was changed to CustomDataItems