How to remove a contact with a specified phone number?
I try this:
String phone ="1234567";
context.getContentResolver().delete(Contacts.Phones.CONTENT_URI,
phone, null);
But I get an error with this:
java.lang.UnsupportedOperationException: Cannot delete that URL:
content://contacts/phones
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:130)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:110)
at android.content.ContentProviderProxy.delete(ContentProviderNative.java:362)
at android.content.ContentResolver.delete(ContentResolver.java:386)
at com.mytest.TestUtil.removeContact(TestUtil.java:87)
Thank you for any pointers.



