◆ V2TIMGroupInfo()
◆ getGroupID()
Get the group ID
- Returns
- Group ID
◆ setGroupID()
void setGroupID |
( |
String |
groupID | ) |
|
|
inline |
Set the group ID. This operation can be performed only during group creation.
- Attention
- The custom group ID must be printable ASCII characters (0x20-0x7e) with a maximum length of 48 bytes. It cannot begin with @TGS# so as to avoid confusion with the default group IDs assigned by IM.
- Parameters
-
◆ getGroupType()
Get the group type
- Returns
- Group type
◆ setGroupType()
void setGroupType |
( |
String |
groupType | ) |
|
|
inline |
Set the group type. This operation can be performed only during group creation.
- Parameters
-
◆ setSupportTopic()
void setSupportTopic |
( |
boolean |
supportTopic | ) |
|
|
inline |
Set supporting topic of not. (valid only for Community)
◆ isSupportTopic()
boolean isSupportTopic |
( |
| ) |
|
|
inline |
Get supporting topic of not. (valid only for Community)
◆ getGroupName()
Get the group name
- Returns
- Group name
◆ setGroupName()
void setGroupName |
( |
String |
groupName | ) |
|
|
inline |
Set the group name. This operation can be performed only during group creation or group information modification.
- Attention
- The maximum length of the group name is 30 bytes.
- Parameters
-
◆ getNotification()
String getNotification |
( |
| ) |
|
|
inline |
◆ setNotification()
void setNotification |
( |
String |
notification | ) |
|
|
inline |
Set the group notice. This operation can be performed only during group creation or group information modification.
- Attention
- The maximum length of the group notice is 300 bytes.
- Parameters
-
◆ getIntroduction()
String getIntroduction |
( |
| ) |
|
|
inline |
Get the group introduction
◆ setIntroduction()
void setIntroduction |
( |
String |
introduction | ) |
|
|
inline |
Set the group introduction. This operation can be performed only during group creation or group information modification.
- Attention
- The maximum length of the group introduction is 240 bytes.
- Parameters
-
introduction | Group introduction |
◆ getFaceUrl()
Get the group profile photo URL
- Returns
- Group profile photo URL
◆ setFaceUrl()
void setFaceUrl |
( |
String |
faceUrl | ) |
|
|
inline |
Set the group profile photo URL. This operation can be performed only during group creation or group information modification.
- Attention
- The maximum length of the group profile photo URL is 100 bytes.
- Parameters
-
faceUrl | Group profile photo URL |
◆ isAllMuted()
Get whether the current group has muted all members
- Returns
- true - All members are muted
◆ setAllMuted()
void setAllMuted |
( |
boolean |
isAllMuted | ) |
|
|
inline |
Set whether to mute all group members. This operation can be performed only during group information modification.
- Parameters
-
isAllMuted | Whether to mute all group members |
◆ getOwner()
Get the group owner
- Returns
- Group owner ID
◆ getCreateTime()
Get the group creation time
- Returns
- Group creation time
◆ getGroupAddOpt()
Get the approval method of the administrator in the group applying mode
- Returns
◆ setGroupAddOpt()
void setGroupAddOpt |
( |
int |
addOpt | ) |
|
|
inline |
Set the approval method of the administrator in the group applying mode, creating groups and modifying group information can be set. The default value of work group is V2TIM_ GROUP_ ADD_ FORBID (that is, users are not allowed to apply for group membership by default). You can modify this field to open it.
- V2TIM_GROUP_ADD_FORBID: forbid anyone to join the group
- V2TIM_GROUP_ADD_ANY: anyone can join the group
- V2TIM_GROUP_ADD_AUTH: group owner or admin approval is required for group joining
- Parameters
-
addOpt | Admin approval options when applying to join a group |
◆ getGroupApproveOpt()
int getGroupApproveOpt |
( |
| ) |
|
|
inline |
Get the approval method of the administrator in the group invitation mode (Supported in 7.1 and later versions)
- Returns
◆ setGroupApproveOpt()
void setGroupApproveOpt |
( |
int |
approveOpt | ) |
|
|
inline |
Set the approval method of the administrator in the group invitation mode, creating groups and modifying group information can be set. Except for work group, the default value of all other group types is V2TIM_ GROUP_ ADD_ FORBID (that is, users are not allowed to join the group through invitation). You can modify this field to open it. This field is not supported in AVChatRoomăCommunity and Topics.
- V2TIM_GROUP_ADD_FORBID: forbid anyone to join the group
- V2TIM_GROUP_ADD_ANY: anyone can join the group
- V2TIM_GROUP_ADD_AUTH: group owner or admin approval is required for group joining
- Parameters
-
approveOpt | Admin approval option when inviting to a group |
◆ setCustomInfo()
void setCustomInfo |
( |
Map< String, byte[]> |
customInfoMap | ) |
|
|
inline |
To set a custom group field, perform the following steps:
1. Go to the console (Feature Configuration -> Custom Group Field) to set the key value of the custom group field. The key field is of the String type, with a maximum length of 16 bytes.
2. Call the setGroupInfo API to set the field. The field value is of the NSData type, with a maximum length of 512 bytes.
- Attention
- This field is mainly used for compatibility with V1 and V2. If you are using V2 APIs, you are advised to use the initGroupAttributes API to set group attributes because the API is more flexible (requiring no configuration in the console) and supports a larger storage capacity (up to 16 KB). You are advised to use the initGroupAttributes API to set group attributes because the API is more flexible (requiring no configuration in the console) and supports a larger storage capacity (up to 16 KB).
◆ getCustomInfo()
Map<String, byte[]> getCustomInfo |
( |
| ) |
|
|
inline |
◆ getLastInfoTime()
Get the latest group data modification time of the group
- Returns
◆ getLastMessageTime()
long getLastMessageTime |
( |
| ) |
|
|
inline |
Get the last time the group sends a message
- Returns
◆ getMemberCount()
Get the number of members that have joined the group
- Returns
◆ getOnlineCount()
Get the number of online group members
- Returns
◆ getMemberMaxCount()
long getMemberMaxCount |
( |
| ) |
|
|
inline |
◆ getRole()
Get the group member role. To switch the role, please call the setGroupMemberRole API.
- Returns
- Member roles: V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_UNDEFINED: non-member V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_ROLE_MEMBER: common member V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_ROLE_ADMIN: group admin V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_ROLE_OWNER: group owner
◆ getRecvOpt()
Get the current user's message receiving option in the group. To modify the group message receiving option, please call the setReceiveMessageOpt API.
- Returns
- Message receiving options: V2TIMMessage.V2TIM_RECEIVE_MESSAGE, V2TIMMessage.V2TIM_NOT_RECEIVE_MESSAGE, V2TIMMessage.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE
◆ getJoinTime()
Get the time when the current user joins the group. The time is automatically generated by the system and cannot be set.
- Returns
- Group joining time, in seconds
◆ V2TIM_GROUP_ADD_FORBID
final int V2TIM_GROUP_ADD_FORBID = 0 |
|
static |
Forbid anyone to join the group
◆ V2TIM_GROUP_ADD_AUTH
final int V2TIM_GROUP_ADD_AUTH = 1 |
|
static |
Require admin approval
◆ V2TIM_GROUP_ADD_ANY
final int V2TIM_GROUP_ADD_ANY = 2 |
|
static |
Anyone can join