Skip to main content

Group Owner Transfer Page

tip

This feature is supported starting from version 5.12.2.

Activate Service

Before using this feature, you must activate the User Profile Hosting service in the Console.

Group Owner Transfer Page

The group owner transfer page allows the current group owner to select a group member and transfer ownership. Below are detailed descriptions of the related components:

  • GroupTransferActivity: The container class for the group owner transfer page, responsible for loading and displaying GroupTransferFragment.
  • GroupTransferFragment: The core component of the group owner transfer page, responsible for displaying the member list and handling the transfer logic.
  • GroupTransferViewModel: Handles data and business logic, including loading the member list, executing queries, and processing the transfer operation.
  • XML Layout: rc_page_group_transfer.xml

Launch the Group Owner Transfer Page

ConversationIdentifier conversationIdentifier = getConversationIdentifier();
GroupMemberRole groupMemberRole = GroupMemberRole.Owner;
startActivity(GroupTransferActivity.newIntent(this, conversationIdentifier, groupMemberRole));

Customization

// Customize CustomGroupTransferFragment

public class CustomGroupTransferFragment extends GroupTransferFragment {

/**
* Transfer group ownership
*
* @param groupMemberInfo The target member's information
*/
protected void onGroupOwnerTransfer(GroupMemberInfo groupMemberInfo) {
}

/**
* Group ownership transfer result
*
* @param groupId The group ID
* @param groupMemberInfo The target member's information
* @param isSuccess Whether the transfer succeeded
*/
protected void onGroupOwnerTransferResult(
String groupId, GroupMemberInfo groupMemberInfo, boolean isSuccess) {
}
}