Chat SDK for Android v1.2.1
agora java chat SDK
Classes | Public Member Functions | List of all members
io.agora.chat.Group Class Reference

Inherits io.agora.chat.EMBase< T >.

Classes

enum  GroupPermissionType
 

Public Member Functions

String getGroupId ()
 
String getGroupName ()
 
String getDescription ()
 
boolean isPublic ()
 
boolean isMemberAllowToInvite ()
 
boolean isMemberOnly ()
 
int getMaxUserCount ()
 
boolean isMsgBlocked ()
 
String getOwner ()
 
String groupSubject ()
 
List< String > getMembers ()
 
int getMemberCount ()
 
String toString ()
 
List< String > getAdminList ()
 
List< String > getBlackList ()
 
List< String > getMuteList ()
 
List< String > getWhiteList ()
 
boolean isAllMemberMuted ()
 
String getExtension ()
 
String getAnnouncement ()
 
List< MucSharedFilegetShareFileList ()
 
GroupPermissionType getGroupPermissionType ()
 
boolean isDisabled ()
 

Detailed Description

The group class.

Member Function Documentation

◆ getAdminList()

List< String > io.agora.chat.Group.getAdminList ( )

Gets the admin list of the group.

Be sure to fetch the detail specification of the group from the server first, see GroupManager#getGroupFromServer(String).

Returns
The admin list of the group.

◆ getAnnouncement()

String io.agora.chat.Group.getAnnouncement ( )

Gets the group announcement. If no announcement is found from the server, the return may be empty.

Reference: You can also call the method: GroupManager#fetchGroupAnnouncement(String) to get the group announcement. As for its asynchronous method, see GroupManager#asyncFetchGroupAnnouncement(String, ValueCallBack).

Returns
The content of the group announcement.

◆ getBlackList()

List< String > io.agora.chat.Group.getBlackList ( )

Gets the blocklist of the group.

If no blocklist is found from the server, the return may be empty.

Reference: To fetch the blocklist, call GroupManager#fetchGroupBlackList(String, int, int).

Only the group owner or admin can call this method.

You also can call it's asynchronous method as follows: GroupManager#asyncFetchGroupBlackList(String, int, int, ValueCallBack).

Returns
The blocklist.

◆ getDescription()

String io.agora.chat.Group.getDescription ( )

Gets the group description.

Returns
The group description.

◆ getExtension()

String io.agora.chat.Group.getExtension ( )

Gets the customized extension of the group.

Returns
The customized extension of the group.

◆ getGroupId()

String io.agora.chat.Group.getGroupId ( )

Gets the group ID.

Returns
The group ID.

◆ getGroupName()

String io.agora.chat.Group.getGroupName ( )

Gets the group name.

Returns
The group name.

◆ getGroupPermissionType()

GroupPermissionType io.agora.chat.Group.getGroupPermissionType ( )

Gets the current user's role in group.

Returns
Returns the permission type of the user in a group, see GroupPermissionType.

◆ getMaxUserCount()

int io.agora.chat.Group.getMaxUserCount ( )

The max number of group members allowed in a group. The param is set when the group is created.

Be sure to fetch the detail specification of the group from the server first, see GroupManager#getGroupFromServer(String). If not, the SDK returns 0.

Returns
The allowed max number of group members.

◆ getMemberCount()

int io.agora.chat.Group.getMemberCount ( )

Gets the member count of the group.

Returns
The count.

◆ getMembers()

List< String > io.agora.chat.Group.getMembers ( )

Gets the member list of the group. If no member is found from the server, the return might be empty.

Reference: You can get the group members in the following ways: (1) When member's number is less than 200, can use GroupManager#getGroupFromServer(String, boolean) to fetch, the second parameter pass in true, can get up to 200 members (2) Use the method of GroupManager#fetchGroupMembers(String, String, int) to get by page, or its asynchronous method of GroupManager#asyncFetchGroupMembers(String, String, int, ValueCallBack)

to get

Returns
The list of the user IDs of the group members.

◆ getMuteList()

List< String > io.agora.chat.Group.getMuteList ( )

Gets the mute list of the group.

If no mute list is found from the server, the return may be empty.

Reference: You can also fetch the mute list by calling GroupManager#fetchGroupMuteList(String, int, int). And only the group owner or admin can call this method.

You can also call it's asynchronous method, see GroupManager#asyncFetchGroupMuteList(String, int, int, ValueCallBack).

Returns
The mute list of the group.

◆ getOwner()

String io.agora.chat.Group.getOwner ( )

Gets the user ID of the group owner.

Returns
The user ID of the group owner.

◆ getShareFileList()

List< MucSharedFile > io.agora.chat.Group.getShareFileList ( )

Gets the group shared file list. If no shared file is found from the server, the return might be empty.

Reference: You can also call GroupManager#fetchGroupSharedFileList(String, int, int) to fetch the shared file list. And for the asynchronous method, see GroupManager#asyncFetchGroupSharedFileList(String, int, int, ValueCallBack).

Returns
The group shared file list.

◆ getWhiteList()

List< String > io.agora.chat.Group.getWhiteList ( )

Gets the allowlist of the group.

If no allowlist is found from the server, the return may be empty.

Reference: You can also fetch the allowlist by calling GroupManager#fetchGroupWhiteList(String, ValueCallBack). And only the group owner or admin can call this method.

Returns
The group allowlist.

◆ groupSubject()

String io.agora.chat.Group.groupSubject ( )

The name of the group. Be sure to fetch the detail specification of the group from the server first, see GroupManager#getGroupFromServer(String).

Returns
The group name.

◆ isAllMemberMuted()

boolean io.agora.chat.Group.isAllMemberMuted ( )

Gets whether all members are muted.

This method has limitations and is recommended to be used with caution.

The state is updated when a all-muted/all-unmuted callback is received, but only for the in-memory object. After the in-memory object is collected and pulled again from the database or server, the state becomes unreliable.

Returns
Whether all members are muted.

◆ isDisabled()

boolean io.agora.chat.Group.isDisabled ( )

Gets whether the group is disabled.

Returns
- true: Group has been disabled;
  • false: Group is not disabled.

◆ isMemberAllowToInvite()

boolean io.agora.chat.Group.isMemberAllowToInvite ( )

Gets whether the group member is allowed to invite other users to join the group.

Returns
- true: The group member can invite other users to join the group;
  • false: Do not allow the group member invite other users to join the group.

◆ isMemberOnly()

boolean io.agora.chat.Group.isMemberOnly ( )

Fetches the group property: whether users can auto join the group VS need requesting or invitation from a group member to join the group. There are four types of group properties used to define the style of a group, and isMemberOnly contains three types including: PRIVATE_OWNER_INVITE, PRIVATE_MEMBER_INVITE, PUBLIC_JOIN_APPROVAL. And do not include GroupManager.GroupStyle#GroupStylePublicOpenJoin.

Returns
  • true: Users can not join the group freely. Needs the invitation from the group owner or members, or the application been approved by the group owner or admins.
  • false: Users can join freely without the group owner or member‘s invitation or the new joiner’s application been approved.

◆ isMsgBlocked()

boolean io.agora.chat.Group.isMsgBlocked ( )

Gets whether the group message is blocked.

Reference: For blocking group message, see GroupManager#blockGroupMessage(String), unblocking see GroupManager#unblockGroupMessage(String)

Returns
- true: The user has blocked the group messages;
  • false: The user does not blocked the group messages.

◆ isPublic()

boolean io.agora.chat.Group.isPublic ( )

Gets whether the group is a public group.

Returns
If the result is true, the group is a public group, otherwise it is a private group.

◆ toString()

String io.agora.chat.Group.toString ( )

Gets the group name, or group ID if the group name is empty. This method can be used for adapter sorting.

Returns
The group name, or group ID if the group name is empty.

The documentation for this class was generated from the following file: