Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ContactsContract.RawContacts.SOURCE_ID #300

Closed
21 tasks done
vestrel00 opened this issue Aug 28, 2023 Discussed in #299 · 1 comment
Closed
21 tasks done

Add support for ContactsContract.RawContacts.SOURCE_ID #300

vestrel00 opened this issue Aug 28, 2023 Discussed in #299 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@vestrel00
Copy link
Owner

vestrel00 commented Aug 28, 2023

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 to RawContactEntity 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 🤔

  • Regression check 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).
  • Check that the source ID is settable using the Insert API.
  • Regression check 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).
  • Check that the source ID is settable using the ProfileInsert API.
  • Regression check Update API (source ID should remain unchanged between updates if the user did not change them).
  • Check that the source ID is modifiable using the Update API.
  • Regression check ProfileUpdate API (source ID should remain unchanged between updates if the user did not change them).
  • Check that the source ID is modifiable using the ProfileUpdate API.
  • Check Delete API (delete by matching source ID using WHERE clause).
  • Regression check ProfileDelete API.
  • Check that Query API includeRawContactsFields function works as expected AND add a mention of the source ID to the function doc.
  • Check that BroadQuery API includeRawContactsFields function works as expected AND add a mention of the source ID to the function doc.
  • Check that PhoneLookupQuery API includeRawContactsFields function works as expected AND add a mention of the source ID to the function doc.
  • Check that RawContactsQuery API includeRawContactsFields and rawContactsWhere functions works as expected AND add a mention of the source ID to the function doc.
  • Ensure that behavior of MoveRawContactsAcrossAccounts API matches behavior of Google Contacts API (use same Account on two different devices/emulators).
  • Regression check behavior of ContactLink API matches behavior of Google Contacts API (use same Account on two different devices/emulators).
  • Regression check behavior of ContactUnlink API matches behavior of Google Contacts API (use same Account on two different devices/emulators).
  • Update all in-code documentation.
  • Update docs, where necessary.
  • Update gh-pages branch.
  • Check if the source ID property should also be added to Groups. If so, create a new issue for it and add it to the upcoming 0.3.1 release.
@vestrel00 vestrel00 added the enhancement New feature or request label Aug 28, 2023
@vestrel00 vestrel00 self-assigned this Aug 28, 2023
@vestrel00 vestrel00 changed the title Add support for ContactsContract.RawContacts.SOURCE_ID Add support for ContactsContract.RawContacts.SOURCE_ID Sep 11, 2023
@vestrel00
Copy link
Owner Author

vestrel00 commented Sep 12, 2023

🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
This is now release in 0.3.1!
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant