Skip to content

Support multiple Notes per RawContact #343

Open
@vestrel00

Description

Problem

As discussed in #342 with @Yameteh, some OEMs such as Oppo and its ColorOS allows a RawContact to have multiple Notes.

The CRUD APIs provided in this library currently only supports one Note per RawContact. Currently,

  • only one Note is read per RawContact even if there are more than one in the Data table
  • performing an update operation on a RawContact with multiple existing Notes may result in unexpected behavior such as update not working or even all Notes being deleted except for one

Note

The behavioral contract that has been upheld by many different OEMs for Notes is that a RawContact only has a single Note. I verified using my own devices that the following OEMs adheres to this implicit contract;

  • Google Pixel
  • Samsung (OneUI)
  • Xiaomi / Redmi (HyperOS)
  • RedMagic (RedMagic OS)
  • Lenovo (ZUI)
  • Apple (iOS)

Solution

Add support for multiple Notes per RawContact.

  1. This must be an opt-in feature / behavioral change.
  2. Do not change the existing API contract of one Note per RawContact.
  3. Create extension functions instead.

This solution requires #344 to be implemented first.

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

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

  • Status

    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions