Browse SDKs · Android
Platform
SDKsAndroid

Update group profile

Update basic group attributes such as group name, introduction, and avatar using setGroupInfo().

Copy

Update basic group attributes including the group name, avatar image URL, and introduction text. Set the target groupID and desired fields in the GroupInfo object; unassigned fields remain unchanged.

Code example

GroupInfo update = new GroupInfo();
update.setGroupID("group_123");
update.setGroupName("Mobile Engineering Team");
update.setIntroduction("Android and iOS collaboration group");
update.setFaceURL("https://example.com/group_avatar.png");

OpenIMClient.getInstance().groupManager.setGroupInfo(
    update,
    new OnBase<String>() {
        @Override
        public void onSuccess(String data) {
            // Group profile updated successfully
        }

        @Override
        public void onError(int code, String error) {
            // Handle update failure
        }
    }
);

Parameters

ParameterTypeRequiredDescription
groupInfoGroupInfoYesGroup entity holding the target groupID and modified properties (such as groupName, introduction, or faceURL).
baseOnBase<String>YesCallback delivering the asynchronous operation result.

Return value

The successful callback confirms that the group profile update was persisted on the server.

State changes after the call

Once the update takes effect, all online group members receive the onGroupInfoChanged(GroupInfo group) event via OnGroupListener. Merge the updated properties into local group caches using groupID. For complete listener registration details, see Group overview.

To manage group announcements or custom business extension metadata, see Set group announcement and Set group extension data.