Skip to main content

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.

// Transfer ownership to another member (owner only)
CometChat.transferGroupOwnership("GUID", "NEW_OWNER_UID", 
    object : CallbackListener<String>() {
        override fun onSuccess(message: String) { }
        override fun onError(e: CometChatException) { }
    })
Important:
  • Only the current owner can transfer ownership
  • The new owner must be an existing group member
  • Original owner becomes a regular admin after transfer
  • Required before owner can leave the group
Use transferGroupOwnership() to transfer ownership to another group member. Only the current owner can do this. The owner must transfer ownership before they can leave the group.
String GUID = "cometchat-guid-1";
String UID = "cometchat-uid-2";

CometChat.transferGroupOwnership(GUID, UID, new CometChat.CallbackListener<String>() {
  @Override
  public void onSuccess(String s) {
    Log.e(TAG, "Transfer group ownership successful");
  }

  @Override
  public void onError(CometChatException e) {
    Log.e(TAG, "Transfer group ownership failed : " + e.getMessage());
  }

});

Next Steps

Leave Group

Leave the group after transferring ownership

Change Member Scope

Update member roles and permissions

Delete Group

Permanently delete the group instead

Retrieve Members

View group members to choose new owner