Delete a contact

Quickly share your Android Code Snippets here...

Delete a contact

Postby rcpinheiro » Tue May 25, 2010 5:58 pm

It seems incredible but I didn't found anywhere code on how to delete a contact using the new 2.x method.
According to the official docs this should work but it doesn't (returns 0):

ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME+"="+name_to_delete, null);

Anyone knows how to do this simple task? Thanks in advance!
Junior Developer
Junior Developer
Posts: 13
Joined: Fri Apr 02, 2010 6:45 pm


Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 1 guest