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

Allow overriding common (builtin) data kinds via custom data integration #344

Open
3 tasks
vestrel00 opened this issue Mar 27, 2024 · 0 comments
Open
3 tasks
Assignees
Labels
enhancement New feature or request

Comments

@vestrel00
Copy link
Owner

vestrel00 commented Mar 27, 2024

Problem

Implementing #343 requires the ability to override default behaviors and rules around common (builtin) data kinds. For example, by default there should only be one Note per RawContact. How do we allow users of this library to change that to be multiple Notes per RawContact?

Solution

Retrofit the custom data setup! Prioritize the processing of the custom data registry first before builtin common data kinds in CRUD APIs. Check the custom data registry first during read/write operations. If a mime type matches in the custom data registry, then do not further check for builtin common data kinds.

For example, #343 will require a new custom data that uses the same mime type as the builtin Contacts Provider mime type for Notes; ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE. We can then use CustomDataCountRestriction.NO_LIMIT for it.

  • Update Kotlin docs
  • Update markdown docs
  • Update gh-pages

Make sure to update this part of this page; https://vestrel00.github.io/contacts-android/customdata/integrate-custom-data/

Screenshot 2024-04-03 at 4 06 22 PM

@vestrel00 vestrel00 added the enhancement New feature or request label Mar 27, 2024
@vestrel00 vestrel00 added this to the More awesome features! milestone Mar 27, 2024
@vestrel00 vestrel00 self-assigned this Mar 27, 2024
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
None yet
Development

No branches or pull requests

1 participant