简体   繁体   English

是否可以在Android 2.2上插入两个具有相同显示名称的新联系人?

[英]Is it possible to insert the two new contacts with same display name on Android 2.2?

I need to insert two new contacts with same display name. 我需要插入两个具有相同显示名称的新联系人。 But all other fields are different. 但是所有其他领域都不同。

How its possible? 怎么可能?

I tried to insert like this, but both contacts are conflicted on Android 2.2 contacts. 我试图这样插入,但两个联系人在Android 2.2联系人上均发生冲突。

Android's 2.x Contacts API will aggregate 2 raw contacts with the same name by default. 默认情况下,Android的2.x联系人API会汇总2个具有相同名称的原始联系人。 See the section Automatic aggregation in Using the Contacts API . 请参阅使用联系人API中的 自动聚合部分。

What you need to do is disable automatic aggregration, which is also described in that very useful article. 您需要做的是禁用自动聚集,这在非常有用的文章中也有介绍。 You merely have to set your RawContact record's AGGREGATION_MODE value to AGGREGATION_MODE_DISABLED. 您只需要将RawContact记录的AGGREGATION_MODE值设置为AGGREGATION_MODE_DISABLED。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM