Browse SDKs · Android
SDKsAndroid

Leave a group

Use quitGroup to remove the current signed-in user from a group.

Copy

quitGroup() only removes the current signed-in user. It does not dismiss the group or remove other members.

OpenIMClient.getInstance().groupManager.quitGroup(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);

After the request succeeds, continue handling the onJoinedGroupDeleted callback.