Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Delete a contact

Delete a contact

Quickly share your Android Code Snippets here...

Delete a contact

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

Hi!
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):

getContentResolver().delete(ContactsContract.Contacts.CONTENT_URI,
ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME+"="+name_to_delete, null);

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

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 2 guests