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's 2.x Contacts API will aggregate 2 raw contacts with the same name by default. See the section Automatic aggregation in Using the Contacts 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.
精彩评论