| Public Callback Function | Function Name |
|---|---|
| void | onHummerStateChanged |
| void | onHummerKicked |
| void | onHummerPreviousTokenExpired |
| Public Callback Function | Function Name |
|---|---|
| void | onPeerMessageReceived |
| Public Callback Function | Function Name |
|---|---|
| void | onRoomMessageReceived |
| void | onRoomAttributesSet |
| void | onRoomAttributesAddedOrUpdated |
| void | onRoomAttributesDeleted |
| void | onRoomAttributesCleared |
| Public Callback Function | Function Name |
|---|---|
| void | onRoomMemberJoined |
| void | onRoomMemberLeft |
| void | onRoomMemberOffline |
| void | onRoomMemberCountChanged |
| void | onRoomMemberAttributesSet |
| void | onRoomMemberAttributesAddedOrUpdated |
| void | onRoomMemberAttributesDeleted |
| void | onRoomMemberAttributesCleared |
| Public Callback Function | Function Name |
|---|---|
| void | onHmrLogWithLevel |
void onHummerStateChanged(State fromState, State toState, String reason);
Callback of status change of a Hummer SDK.
| Parameter | Description |
|---|---|
| fromState | Status before change. See details in HMR.State for details.. |
| toState | Current status |
| reason | Change reason |
void onHummerKicked(int code, String description);
Callback of the SDK to remove users when login through multiple ends is detected.
| Parameter | Description |
|---|---|
| code | Reason for removing a user |
| description | Description of reasons for removing a user |
void onHummerPreviousTokenExpired();
Callback notification returned by the SDK to the service layer upon token expiration.
Notes:
- This callback is triggered only when a token expires upon the SDK reconnection from disconnection. Once receiving this call, call refreshToken to refresh the token.
void onPeerMessageReceived(long fromUserId, Message message);
A notification callback of this event will be received upon the receipt of P2P signaling messages.
Notes:
- Call sendMessage to perform callback.
| Parameter | Description |
|---|---|
| fromUserId | Sender ID |
| message | Received signaling message |
void onRoomMessageReceived(@NonNull RoomId roomId,
long fromUserId,
Message message);
When you send a signaling message to a room, all members in this room will receive a callback notification of this event.
Notes:
- Call sendMessage to callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| fromUserId | Sender ID |
| message | Received signaling message |
void onRoomAttributesSet(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Notification of setting room profiles.
Notes:
- Call setRoomAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Operator ID |
| attributes | Configured profiles |
void onRoomAttributesAddedOrUpdated(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Notification of adding or updating room profiles.
Notes:
- Call addOrUpdateRoomAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Operator ID |
| attributes | Added or updated profiles |
void onRoomAttributesDeleted(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Notification of deleting room profiles.
Notes:
- Call deleteRoomAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Operator ID |
| attributes | Deleted profiles |
void onRoomAttributesCleared(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Notification of clearing room profiles.
Notes:
- Call clearRoomAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Operator ID |
| attributes | Cleared profiles |
void onRoomMemberJoined(@NonNull RoomId roomId, @NonNull Set<Long> joinMembers);
Notification of members joining a room.
Notes:
- Call join to perform callback.
- This notification will not be sent if over 500 members have joined the room.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| joinMembers | List of member IDs |
void onRoomMemberLeft(@NonNull RoomId roomId, @NonNull Set<Long> leftMembers);
Notification of members exiting a room.
Notes:
- Call leave to perform callback.
- This notification may not be received when you exit a room by calling leaveRoom.
- It can be received by other members when they exit the room.
- This notification will not be sent if over 500 members have joined the room.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| leftMembers | List of member IDs |
void onRoomMemberOffline(Set<RoomId> roomIds);
Notification of the current user exited the room due to disconnection timeout.
Notes:
- This notification is triggered only when the current user exits the room due to local disconnection timeout.
| Parameter | Description |
|---|---|
| roomIds | Room ID list |
void onRoomMemberCountChanged(@NonNull RoomId roomId, Integer count);
Notification of number change of room members.
Notes:
| Parameter | Description |
|---|---|
| roomId | Room ID |
| count | Number of room members |
void onRoomMemberAttributesSet(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Callback notification of setting room member profiles.
Notes:
- Call setMemberAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Room member ID |
| attributes | Configured profiles |
void onRoomMemberAttributesAddedOrUpdated(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Callback notification of adding or updating room member profiles.
Notes:
- Call addOrUpdateMemberAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Room member ID |
| attributes | Added or updated profiles |
void onRoomMemberAttributesDeleted(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Callback notification of deleting room member profiles.
Notes:
- Call deleteMemberAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Room member ID |
| attributes | Deleted profiles |
void onRoomMemberAttributesCleared(@NonNull RoomId roomId,
long userId,
@NonNull Map<String, String> attributes);
Callback notification of clearing room member profiles.
Notes:
- Call clearMemberAttributes to perform callback.
| Parameter | Description |
|---|---|
| roomId | Room ID |
| userId | Room member ID |
| attributes | Cleared profiles |
void onHmrLogWithLevel(HMRLogLevel level, String msg)
Log output callback for getting logs.
| Parameter | Description |
|---|---|
| level | Level of logs to be output, see details in HMR.HMRLogLevel |
| msg | Logs to be output |
Helpful
Not helpful
Submitted! Your feedback would help us improve the website.
Feedback
Top