powered by Jive Software

How delete contact from contact list?

Hello,

I’m looking for a way to delete a contact. Here is my function, but I cannot delete the contact …

public void deleteContact() { Workspace workspace = SparkManager.getWorkspace(); String user = new UserManager().getNickname(); String userGroup = this.isMemberOf(user); ContactList contactList = workspace.getContactList(); List<ContactGroup> contactgroups = contactList.getContactGroups(); for(ContactGroup group : contactgroups) { List<ContactItem> contactitems = group.getContactItems(); for(ContactItem contact : contactitems) {
          // delete contact ?? } } }

Can you help me please?

Thank you

ContactList contactList = workspace.getContactList();           List<ContactGroup> contactgroups = contactList.getContactGroups(); for(ContactGroup group : contactgroups) { List<ContactItem> contactitems = group.getContactItems(); for(ContactItem contact : contactitems) { group.removeContactItem(contact); } }