0

I want to create raw contacts in android contacts framework which in turn shall create their own exclusive contact row, This contact row will never be shared by any other raw contact also my raw contact shall also not to be aggregated with any other contact row. How to achieve this ?

In other words:

Raw Contact <------This shall be the only rel for these 2 entities------> Aggregated contact row

humble_wolf
  • 1,497
  • 19
  • 26

1 Answers1

0

You'll need to setup a sync adapter (1, 2) that will be run periodically and/or when contacts info change, and when it runs, it'll simply make sure there are no entries in AggregationExceptions that links the apps' raw contacts to any other raw contact.

marmor
  • 27,641
  • 11
  • 107
  • 150
  • Will the sync adaptor automatically takes care of the entries in AggregationExceptions or I have to write the logic ? – humble_wolf Sep 21 '20 at 19:22
  • 1
    you'll have to write it, but should be simple logic, just modify any entry you find in the aggregation-exceptions table to be of type "keep-separated" – marmor Sep 21 '20 at 19:29
  • Got it, One more question, Does Android Framework write all the aggregation it does in the AggregationExceptions Table ? Because then the name of the table is a bit misleasing, Isn't it ? – humble_wolf Sep 21 '20 at 19:55
  • good question, I think it does but I'm not sure... you can test it by creating a new contact with the same name + phone/email, Android should then join it with your existing one, and you can check if that appears in the Aggregation exceptions table – marmor Sep 22 '20 at 05:47
  • It seems Android does not write all the aggregation it does in the AggregationException Table, I verified it in my device(by default a lot of aggregation is being done in my contacts, which I can see in the Individual contact but nothing shows up in my AggregationException table, Once I unlink contacts manually they show up in the table). But following your Idea I can probe the aggregation being done in the raw_contact table(instead of suggested table) and then write the rules in AggregationException table. – humble_wolf Sep 23 '20 at 14:56