Can anyone please help me on adding new contacts in address book and apply them in batch by using new ContactsContract API? I could not find a proper tutorial on this.
I am able to add a single contact. But batch update fails with Unknown contacts being added.
Currently I am looping through while loop while collecting info. of users to write, store it in the ArrayList<ContentProviderOperation>
and applying and
ContentProviderResult[] result = getContentResolver().applyBatch(ContactsContract.AUTHORITY, op_list);
But only one contact is updated with name and other are updated as unknown contacts.
Please help with a sample code which adds the fields like name,nickname,mobile,title,email,Skype id,work-country etc.
Any help ? Thanks .