Delete Contacts

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Delete Contacts

Postby rajeshcit » Sat Nov 21, 2009 7:36 am

Hai,


I tried to delete contacts using this method
try to delete all contacts or a particular contact.getting same error please help me

public void deleteContact()
{
getContentResolver().delete(Contacts.Phones.CONTENT_URI, Contacts.PhonesColumns.TYPE_MOBILE+"?", new String[]{"9810207980"});
}

getting some error like this

11-21 11:54:31.711: ERROR/DatabaseUtils
(612): java.lang.UnsupportedOperationException: Cannot delete that URL: content://contacts/phones

11-21 11:54:31.711: ERROR/DatabaseUtils(612): at com.android.providers.contacts.ContactsProvider.deleteInternal(ContactsProvider.java:2005)

11-21 11:54:31.711: ERROR/DatabaseUtils(612): at android.content.AbstractSyncableContentProvider.delete(AbstractSyncableContentProvider.java:276)

11-21 11:54:31.711: ERROR/DatabaseUtils(612): at android.content.ContentProvider$Transport.delete(ContentProvider.java:150)

11-21 11:54:31.711: ERROR/DatabaseUtils(612): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:150)

11-21 11:54:31.711: ERROR/DatabaseUtils(612): at android.os.Binder.execTransact(Binder.java:287)

11-21 11:54:31.711: ERROR/DatabaseUtils
(612): at dalvik.system.NativeStart.run(Native Method)


please help me

thanks
rajeshcit
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Nov 18, 2009 9:38 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 6 guests