Public Callback Function | Method Signature |
---|---|
void | onUpdateHummerState(State fromState, State toState) |
Public Callback Function | Method Signature |
---|---|
void | onHummerTokenInvalid(TokenInvalidCode code, String desc) |
Public Callback Function | Method Signature |
---|---|
void | onUpdateChannelState(ChannelState fromState, ChannelState toState) |
Public Callback Function | Method Signature |
---|---|
void | onChatRoomDismissed(ChatRoom chatRoom, User member) |
void | onBasicInfoChanged(ChatRoom chatRoom, Map<ChatRoomInfo.BasicInfoType, String> propInfo) |
Public Callback Function | Function Name |
---|---|
void | beforeSendingMessage( Message message) |
void | afterSendingMessage(Message message) |
void | beforeReceivingMessage(Message message) |
void | afterReceivingMessage(Message message) |
void onUpdateHummerState(State fromState, State toState)
Callback of Hummer SDK status changes
Parameter | Description |
---|---|
fromState | Pre-change status. See details in HMR.State. |
toState | Current status |
void onHummerTokenInvalid(TokenInvalidCode code, String desc)
Notification of invalid authentication token
Parameter | Description |
---|---|
code | An invalid type. See details in HMR.TokenInvalidCode. |
desc | Invalidation reasons |
public enum TokenInvalidCode {
EXPIRED(1);
}
Token invalid type
Bit operation | Description |
---|---|
EXPIRED(1) | Expired |
void onUpdateChannelState(ChannelState fromState, ChannelState toState);
Notification of change in SDK connection status
Parameter | Description |
---|---|
fromState | Pre-change status. See details in ChannelState. |
toState | Current status |
void onChatRoomDismissed(@NonNull ChatRoom chatRoom, @NonNull User member);
Callback notification upon chatroom closure
Note:
- Call dismissChatRoom to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
member | An administrator closing the chatroom |
void onBasicInfoChanged(@NonNull ChatRoom chatRoom,
@NonNull Map<ChatRoomInfo.BasicInfoType, String> propInfo);
Callback of changes to basic chatroom information
Note:
- Call changeBasicInfo to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
propInfo | A changed key-value pair. See BasicInfoType for reference enumeration of key values. |
void onMemberJoined(@NonNull ChatRoom chatRoom, @NonNull List<User> members);
Callback of members joining the chatroomm
Note:
- Call joinChatRoom to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
members | Members joining the chatroom |
void onMemberLeaved(@NonNull ChatRoom chatRoom,
@NonNull List<User> members,
int type,
@NonNull String reason);
Callback of members exiting the chatroom
Note:
- Call leaveChatRoom to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
members | Members exiting the chatroom |
type | Operation types for exiting the chatroom 0: LEAVING, 1: DISCONNECTED |
reason | Reasons for exiting the chatroom |
void onMemberCountChanged(@NonNull ChatRoom chatRoom, int count);
Callback of changes to chatroom member count
Note:
- Call joinChatRoom and leaveChatRoom to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
count | A changed count |
void onMemberKicked(@NonNull ChatRoom chatRoom,
@NonNull User admin,
@NonNull List<User> members,
@NonNull String reason);
Callback of chatroom members removal
Note:
- Call kick perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
admin | An administrator executing member removal |
members | Members removed from channel |
reason | Reasons for member removal |
void onRoleAdded(@NonNull ChatRoom chatRoom,
@NonNull String role,
@NonNull User admin,
@NonNull User fellow);
Callback of role adding to chatroom members
Note:
- Call addRole to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
role | An added role |
admin | An administrator adding a role |
fellow | Member to whom role was added |
void onRoleRemoved(@NonNull ChatRoom chatRooA request context object, callback pass-through to extract context from listenerm,
@NonNull String role,
@NonNull User admin,
@NonNull User fellow);
Callback of role removal from chatroom members
Note:
- Call removeRole to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
role | A removed role |
admin | An administrator removing a role |
fellow | Member from whom role was removed |
void onMemberMuted(@NonNull ChatRoom chatRoom,
@NonNull User operator,
@NonNull Set<User> members,
@Nullable String reason);
Callback of chatroom member muted
Note:
- Call muteMember to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
operator | An administrator for muting |
members | Muted members |
reason | Reason for muting |
void onMemberUnmuted(@NonNull ChatRoom chatRoom,
@NonNull User operator,
@NonNull Set<User> members,
@Nullable String reason);
Callback of chatroom members unmuted
Note:
- Call unmuteMember to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
operator | An administrator for unmuting |
members | Unmuted members |
reason | Reason |
void onUserInfoSet(@NonNull ChatRoom chatRoom,
@NonNull User user,
@NonNull Map<String, String> infoMap);
Callback of setting information of a chatroom member
Note:
- Call setUserInfo to perform callback.
Parameter | Description |
---|---|
chatRoom | Chatroom ID |
user | The user whose information changed |
infoMap | Set user information |
void beforeSendingMessage(@NonNull Message message);
This callback precedes your calling ChatService.send(Message, HMR.Completion) to send a message.
It is commonly used to add the message to a session rendering interface before sending or to store the message in a database.
Parameter | Description |
---|---|
message | Message sent |
void afterSendingMessage(@NonNull Message message);
This callback occurs after you call ChatService.send(Message, HMR.Completion) to send a message (regardless of message sending success or failure).
Parameter | Description |
---|---|
message | Message sent |
void beforeReceivingMessage(@NonNull Message message);
Perform this callback before message receiving and processing.
Parameter | Description |
---|---|
message | Message received |
void afterReceivingMessage(@NonNull Message message);
Callback will be performed by this method when a new message is received.
Parameter | Description |
---|---|
message | Message received |