contactstore icon indicating copy to clipboard operation
contactstore copied to clipboard

[Feature Request] Providing like the "Main" account of an existing contact

Open fgubler opened this issue 1 year ago • 3 comments

This is related to my previous feature-request (thanks again for that) about contact-groups and their associated accounts.

My scenario is as follows: I load an existing contact from Android using the ContactStore. Now I would like to add a group-membership. How do I know which ones to offer to the user? If the user wants to create a new one, how do I know in which account I need to store it?

All of that works for creating a new account, ofc, because there I (or the user) need to specify in which account to store the contact. But for an existing contact, that information is missing.

If I understood it correctly, there is no "one single" account on the Contact class because you potentially aggregate the information over multiple accounts. Is it possible to identify something like a "main" account? Or providing a list of the involved accounts (in that case I could do a best-effort guess and e.g. prefer a google account over whatsapp or something like that)?

fgubler avatar Mar 05 '23 08:03 fgubler

Is there any chance of that? :-)

fgubler avatar May 01 '23 11:05 fgubler

I am having troubles understanding what you are trying to do.

If i am getting this right, you are asking which contacts should you allow the users to add to create groups you create. What stops you from allowing them to create groups with any account on the device?

alexstyl avatar May 03 '23 07:05 alexstyl

Sorry for the unclear description :-)

  • If a user wants to edit an existing contact, I get no information in which account(s) this contact is stored.
  • As we have discussed in a previous issue, each ContactGroup is stored in a specific account.
  • Therefore, if I want to enable the user to add a ContactGroup to a contact, that can only work if both the contact and the ContactGroup are stored in the same account.
  • I can only guarantee that if I know in which account or accounts the contact is stored.

Does that make more sense?

fgubler avatar May 03 '23 09:05 fgubler