I have an app that exports contacts. Similar contacts get aggregated by an internal scoring mechanism, see Android contacts aggregation process
My issue is that the same contacts exported with Outlook for Android get a different aggregation.
To test this i have created one contact (Identicus) with name, given name, work phone and email 5 times. It gets aggregated for both apps.
I have created another two contacts (Hans Test and Hans Othertest) with the same given name and work phone, but different names. When i export it the two contacts get aggregated, when Outlook exports it they are not aggregated.
With ContactsContract.RawContacts.AGGREGATION_MODE_DISABLED i can disable aggregation for all my contacts - but i want the identical contacts to be aggregated.
I checked https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions to see if i could identify the contacts that were about to be aggregated and un-aggregate them by using an AggregationException, but the data seems to be not useful.
Does anybody have an idea why the aggregation works differently for Outlook and my app? Or a hint how i could control this behavior?