Add support for ContactsContract.RawContacts.SOURCE_ID
#300
Labels
enhancement
New feature or request
ContactsContract.RawContacts.SOURCE_ID
#300
Problem
As discussed in #299 with @marrale, this library currently does not support reading and writing the value of RawContact's
ContactsContract.SyncColumns.SOURCE_ID
, which is a critical component to sync adapter operations.Solution
Add
sourceId
field toRawContactEntity
and support CRUD operations for it.Although this library is focused on supporting application use cases instead of sync adapter use cases, this field is pretty simple to add and may be used by apps for read operations/queries. It's not that out-of-place 🤔
Insert
API (new RawContacts with null source ID but non-null Account should have a non-null source ID automatically assigned to it post-insert assuming sync settings and network connection are enabled).Insert
API.ProfileInsert
API (new RawContacts with null source ID but non-null Account should have a non-null source ID automatically assigned to it post-insert assuming sync settings and network connection are enabled).ProfileInsert
API.Update
API (source ID should remain unchanged between updates if the user did not change them).Update
API.ProfileUpdate
API (source ID should remain unchanged between updates if the user did not change them).ProfileUpdate
API.Delete
API (delete by matching source ID using WHERE clause).ProfileDelete
API.Query
APIincludeRawContactsFields
function works as expected AND add a mention of the source ID to the function doc.BroadQuery
APIincludeRawContactsFields
function works as expected AND add a mention of the source ID to the function doc.PhoneLookupQuery
APIincludeRawContactsFields
function works as expected AND add a mention of the source ID to the function doc.RawContactsQuery
APIincludeRawContactsFields
andrawContactsWhere
functions works as expected AND add a mention of the source ID to the function doc.MoveRawContactsAcrossAccounts
API matches behavior of Google Contacts API (use same Account on two different devices/emulators).ContactLink
API matches behavior of Google Contacts API (use same Account on two different devices/emulators).ContactUnlink
API matches behavior of Google Contacts API (use same Account on two different devices/emulators).The text was updated successfully, but these errors were encountered: