Browse SDKs · Android
SDKsAndroid

Dismiss a group

Use the Android SDK to dismiss a group owned by the current user.

Copy

dismissGroup() dismisses the specified group and is available only to its owner.

OpenIMClient.getInstance().groupManager.dismissGroup(new OnBase<String>() {
    @Override public void onSuccess(String data) { /* The request completed. */ }
    @Override public void onError(int code, String error) { /* code and error describe the failure. */ }
}, groupID);

A successful callback means that the dismissal request completed; it does not mean that every client has updated its UI. onGroupDismissed provides the dismissed group's GroupInfo. Use its groupID to close the conversation and remove the group state. See Group overview for the complete listener setup.