> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Group

> Update CometChat group details with the Android SDK, including name, type, icon, description, metadata, and tags.

> [accordion] AI Integration Quick Reference
>
> ```kotlin theme={null}
> // Update group details
> val group = Group("GUID", "New Name", CometChatConstants.GROUP_TYPE_PUBLIC, "")
> group.description = "Updated description"
> group.icon = "https://example.com/icon.png"
>
> CometChat.updateGroup(group, object : CometChat.CallbackListener<Group>() {
>     override fun onSuccess(updatedGroup: Group) { }
>     override fun onError(e: CometChatException) { }
> })
> ```
>
> **Note:** Only admins and moderators can update group details. See [Group Class](https://www.cometchat.com/docs/sdk/android/v4/create-group.md#group-class) for editable fields.

## Update Group

Use `updateGroup()` with a [`Group`](https://www.cometchat.com/docs/sdk/reference/entities#group) object containing the fields you want to update.

> [tab] Java
>
> ```java theme={null}
> private String GUID = "GUID";
> private String groupName = "Hello Group!";
> private String groupType = CometChatConstants.GROUP_TYPE_PUBLIC;
> private String password = "";
> Group group = new Group(GUID, groupName, groupType, password);
>
> CometChat.updateGroup(group,  new CometChat.CallbackListener<Group>() {
>   @Override
>   public void onSuccess(Group group) {
>     Log.d(TAG, "Groups details updated successfully: " + group.toString());
>   }
>   @Override
>   public void onError(CometChatException e) {
>     Log.d(TAG, "Group details update failed with exception: " + e.getMessage());
>   }
> });
> ```

> [tab] Kotlin
>
> ```kotlin theme={null}
> val GUID:String="GUID"
> val groupName:String="Hello Group!"
> val groupType:String = CometChatConstants.GROUP_TYPE_PUBLIC
> val password:String=""
>
> val group=Group(GUID,groupName,groupType,password)
>
> CometChat.updateGroup(group,object :CometChat.CallbackListener<Group>(){
>   override fun onSuccess(p0: Group?) {
>     Log.d(TAG, "Groups details updated successfully: " + p0?.toString())
>   }
>   override fun onError(p0: CometChatException?) {
>     Log.d(TAG, "Group details update failed with exception: " + p0?.message)
>   }
> })
> ```

This method takes an instance of the [`Group`](https://www.cometchat.com/docs/sdk/reference/entities#group) class as a parameter, which should contain the data you wish to update.

| Parameter | Description |
| - | - |
| `group` | An instance of the [`Group`](https://www.cometchat.com/docs/sdk/reference/entities#group) class |

After the successful update of the group, you will receive an instance of the [`Group`](https://www.cometchat.com/docs/sdk/reference/entities#group) class containing the updated information of the group.

> [!NOTE]
>
> There is no real-time event listener available to receive updated group details when the `updateGroup()` method is called. To get the latest group information, you need to fetch the group details again using the appropriate method.

For more information on the `Group` class, please check [here](https://www.cometchat.com/docs/sdk/android/v4/create-group.md#group-class)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.