You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 useCustomDataCountRestriction.NO_LIMIT
for it.gh-pages
Make sure to update this part of this page; https://vestrel00.github.io/contacts-android/customdata/integrate-custom-data/
The text was updated successfully, but these errors were encountered: