I am trying to delete a particular contact from phone. I can delete the full contact. How to delete a particular contact using contact id. I want to delete the full datas in
Using Contacts.CONTENT_LOOKUP_URI is not needed if you have contactId. In fact I experimented problems deleting some contacts using it.
The correct way if you have contactId is to directly use ContactsContract.Contacts.CONTENT_URI:
Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI,contactId);
int deleted = context.getContentResolver().delete(uri,null,null);
return deleted>0;