New Programmatically Added Contact Not Visible In Contacts Application
I'm developping an application in Android 1.6 (and can't use 2.0 or older). I add a new contact on my phone as following : ContentValues contentValues = new ContentValues(); cont
Solution 1:
I found the answer : after adding new contact (insert), add it to myContactsGroup with Contacts.People.addToMyContactsGroup() method :
// get new contact id :
int contactId = Integer.valueOf(contactUri.toString().substring(contactUri.toString().lastIndexOf("/")+1));
// add the new contact to myContactsGroup to have it in Contacts Application :
Contacts.People.addToMyContactsGroup(this.getContentResolver(), contactId);
Post a Comment for "New Programmatically Added Contact Not Visible In Contacts Application"