rawcontacts

Save Contacts as “Phone contact”

走远了吗. 提交于 2019-12-01 11:35:16
问题 Is there way to programmatically adds the contact to the internal phone contacts book as a "phone contact"? I've tried: list.add(ContentProviderOperation .newInsert(ContactsContract.RawContacts.CONTENT_URI) .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, null) .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, null) .build()); with this parameters contact successfully saves to the phone, but in case i set up filter to "display phone contacts only" - created contact not appears. btw,

Add RawContact so it aggregates to an existing contact

耗尽温柔 提交于 2019-11-30 12:04:07
I am trying to add a new RawContact to an existing Contact so my custom data field shows up inside the original Contact. I tried Adding a StructuredName Data row to my new RawContact with a DisplayName that matches the DisplayName of the original RawContact. I thought matching DisplayNames would be enough to aggregate both RawContacts but the contacts app seems to display both RawContacts as different Contacts. Here is my code public static void addContact(Context context, Account account, String number, String displayname) { Log.e(Global.TAG, "adding contact: " + number + " / " + displayname)

Add RawContact so it aggregates to an existing contact

房东的猫 提交于 2019-11-29 12:43:26
问题 I am trying to add a new RawContact to an existing Contact so my custom data field shows up inside the original Contact. I tried Adding a StructuredName Data row to my new RawContact with a DisplayName that matches the DisplayName of the original RawContact. I thought matching DisplayNames would be enough to aggregate both RawContacts but the contacts app seems to display both RawContacts as different Contacts. Here is my code public static void addContact(Context context, Account account,