The Hive Chat service provides essential features for seamless chat within the app, including real-time chat, group chat, one-on-one chat, and user blocking functionality. More...
Classes | |
class | hive.Chat |
The Hive Chat service provides essential features for seamless chat within the app, including real-time chat, group chat, one-on-one chat, and user blocking functionality. More... | |
class | hive.ChannelSendMessageParams |
Channel message sending object This object contains the information for sending a message to a channel. More... | |
class | hive.DirectSendMessageParams |
1:1 message sending object This object contains the information for sending a message to a specific user. More... | |
class | hive.CreateChannelParams |
Channel creation object This object contains the information for creating a channel. More... | |
class | hive.GetChannelsParams |
Channel information retrieval object This object contains the information for retrieving channel details. More... | |
class | hive.EnterChannelParams |
Channel entry object This object contains the information for entering a channel. More... | |
class | hive.ChannelMessageListQueryParams |
Channel message query object More... | |
class | hive.ChannelMessageListQueryResponse |
Channel message query response object More... | |
class | hive.TranslateParams |
Translation request object More... | |
class | hive.Channel |
Object returned when retrieving channel information This object is returned when retrieving information about a channel. More... | |
class | hive.ChannelPage |
Channel page object returned when retrieving channel information This object represents a page of channels returned when retrieving channel information. More... | |
class | hive.Member |
Member object returned when retrieving member and channel information This object represents a member returned when retrieving member and channel information. More... | |
class | hive.BlockMember |
Blocked member object returned when retrieving blocked members This object represents a blocked member returned when retrieving blocked members. More... | |
class | hive.EnteredMember |
Member object who entered the channel The information of the member who entered the channel is received through the ChannelHandler.onEnteredMember event. More... | |
class | hive.ExitedMember |
Member object who exited the channel The information of the member who exited the channel is received through the ChannelHandler.onExitedMember event. More... | |
class | hive.DeletedChannel |
Deleted channel information object The information of the deleted channel is delivered through the ChannelHandler.onDeletedChannel event. More... | |
class | hive.ChannelNoticeMessage |
Channel notice message object The channel notice message information is delivered through the ChannelHandler.onNoticeMessage event. More... | |
class | hive.ChannelMessage |
Channel message object The channel message information is delivered through the ChannelHandler.onChannelMessage event. More... | |
class | hive.DirectMessage |
Direct message object The direct message information is delivered through the [DirectMessageListener.onDirectMessage] event. More... | |
class | hive.NoticeMessage |
User notice message object The user notice message information is delivered through the UserHandler.onNoticeMessage event. More... | |
Enumerations | |
enum | hive.ChannelType |
Channel Type. More... | |
enum | hive.SortType |
Sort Type Sorting value for the retrieved channel list. More... | |
Functions | |
delegate void | hive.Chat.onConnect (ResultAPI result) |
the result after connecting to the Hive chat server More... | |
delegate void | hive.Chat.onReconnect (ResultAPI result, List< String > channelIds, List< String > failChannelIds) |
the result after reconnecting to the Hive chat server More... | |
delegate void | hive.Chat.onDisconnect (ResultAPI result) |
the result after disconnecting from the Hive chat server More... | |
delegate void | hive.Chat.onChannelSendMessage (ResultAPI result, ChannelSendMessageParams retryParams) |
Listener for delivering the result after sending a channel message More... | |
delegate void | hive.Chat.onDirectSendMessage (ResultAPI result, DirectSendMessageParams retryParams) |
Listener for delivering the result after sending a 1:1 message More... | |
delegate void | hive.Chat.onCreateChannel (ResultAPI result) |
the result after channel creation More... | |
delegate void | hive.Chat.onGetChannels (ResultAPI result, List< Channel > channels, ChannelPage channelPage) |
The result after retrieving the list of channels. More... | |
delegate void | hive.Chat.onGetChannelInfo (ResultAPI result, Channel channel, List< Member > members) |
The result after retrieving channel information. More... | |
delegate void | hive.Chat.onGetChannelMembers (ResultAPI result, List< Member > members) |
The result after retrieving the list of channel members. More... | |
delegate void | hive.Chat.onDeleteChannel (ResultAPI result) |
The result after deleting the channel. More... | |
delegate void | hive.Chat.onEnterChannel (ResultAPI result) |
The result after entering the channel. More... | |
delegate void | hive.Chat.onEixtChannel (ResultAPI result) |
The result after exiting the channel. More... | |
delegate void | hive.Chat.onGetChannelsByUser (ResultAPI result, List< Channel > channels) |
The result after retrieving the list of channels by user. More... | |
delegate void | hive.Chat.onGetBlockMembers (ResultAPI result, List< BlockMember > blockMembers) |
The result after retrieving the list of blocked members. More... | |
delegate void | hive.Chat.onBlockMember (ResultAPI result) |
The result after blocking a member. More... | |
delegate void | hive.Chat.onUnblockMember (ResultAPI result) |
The result after unblocking a member. More... | |
static void | hive.Chat.connect (String extraData, onConnect listener) |
[Deprecated] The result after attempting to connect to the Hive chat server This is the first API that must be called before accessing the Hive chat feature. More... | |
static void | hive.Chat.connect (onConnect listener) |
The result after attempting to connect to the Hive chat server This is the first API that must be called before accessing the Hive chat feature. More... | |
static void | hive.Chat.reconnect (onReconnect listener) |
Reconnect to Hive chat server Reconnects to the Hive chat server. More... | |
static void | hive.Chat.disconnect (onDisconnect listener) |
Disconnects from the Hive chat server This API is automatically called when the authenticated user information is signed out. More... | |
static Boolean | hive.Chat.isConnected () |
Retrieves the current user's Hive chat server connection status Checks the connection status to the Hive chat server. More... | |
static void | hive.Chat.sendMessage (ChannelSendMessageParams param) |
Send channel message Sends a message to the channel the user has joined, and allows configuring message transmission details by creating a ChannelSendMessageParams object. More... | |
static void | hive.Chat.sendMessage (ChannelSendMessageParams param, onChannelSendMessage listener) |
Send channel message Sends a message to the channel the user has joined, with details configured using a ChannelSendMessageParams object. More... | |
static void | hive.Chat.sendMessage (DirectSendMessageParams param) |
Send 1:1 message Sends a message to a specific target user, and allows configuring message transmission details by creating a DirectSendMessageParams object. More... | |
static void | hive.Chat.sendMessage (DirectSendMessageParams param, onDirectSendMessage listener) |
Send 1:1 message Sends a message to a specific target user, with details configured using a DirectSendMessageParams object. More... | |
static void | hive.Chat.addConnectionHandler (String uniqueKey, ConnectionHandler connectionHandler) |
Detects the connection status with the Hive chat server and listens for status change events. More... | |
static void | hive.Chat.addChannelHandler (String uniqueKey, ChannelHandler channelHandler) |
Detects events between the connected user and the Hive chat server channel, and listens for change events. More... | |
static void | hive.Chat.addDirectMessageHandler (String uniqueKey, DirectMessageHandler directMessageHandler) |
Detects 1:1 message events delivered to the connected user on the Hive chat server and listens for these events. More... | |
static void | hive.Chat.addUserHandler (String uniqueKey, UserHandler userHandler) |
Registers a listener that detects and receives user-related events on the connected Hive chat server. More... | |
static void | hive.Chat.addCustomDataHandler (String uniqueKey, CustomDataHandler customDataHandler) |
Registers a listener that detects and receives custom data for the connected user on the Hive chat server. More... | |
static void | hive.Chat.removeConnectionHandler (String uniqueKey) |
Removes the registered connection event handler (addConnectionHandler) Removes the registered connection event handler. More... | |
static void | hive.Chat.removeChannelHandler (String uniqueKey) |
Removes the registered channel event handler (addChannelHandler) Removes the registered channel event handler. More... | |
static void | hive.Chat.removeDirectMessageHandler (String uniqueKey) |
Removes the registered 1:1 message event handler (addDirectMessageHandler) Removes the registered 1:1 message event handler. More... | |
static void | hive.Chat.removeUserHandler (String uniqueKey) |
Removes the registered user event listener (addUserHandler) Removes the registered UserHandler by uniqueKey, and stops receiving user-related events such as DirectMessage and NoticeMessage. More... | |
static void | hive.Chat.removeCustomDataHandler (String uniqueKey) |
Removes the registered custom data event listener (addCustomDataHandler) Removes the registered CustomDataHandler by uniqueKey, and stops receiving custom data related to the specified user. More... | |
static void | hive.Chat.createChannel (CreateChannelParams param, onCreateChannel listener) |
Create channel Creates a new conversation channel. More... | |
static void | hive.Chat.getChannels (GetChannelsParams param, onGetChannels listener) |
Retrieve list of currently created channels Retrieves the list of currently created channels. More... | |
static void | hive.Chat.getChannelInfo (String channelId, onGetChannelInfo listener) |
Retrieve channel information Retrieves the detailed information of a specific channel. More... | |
static void | hive.Chat.getChannelMembers (String channelId, onGetChannelMembers listener) |
Retrieve channel participant information Retrieves the participant information of a specific channel. More... | |
static void | hive.Chat.deleteChannel (String channelId, onDeleteChannel listener) |
Delete channel Deletes the channel. More... | |
static void | hive.Chat.enterChannel (EnterChannelParams param, onEnterChannel listener) |
Enter channel Enters the channel. More... | |
static void | hive.Chat.exitChannel (String channelId, onEixtChannel listener) |
Exit Channel Exit the channel the current user is participating in. More... | |
static void | hive.Chat.getChannelsByUser (onGetChannelsByUser listener) |
Retrieve channels the user is participating in Retrieves the list of channels the current user is participating in. More... | |
static void | hive.Chat.getBlockMembers (onGetBlockMembers listener) |
Get blocked member The current user retrieves the list of members blocked. More... | |
static void | hive.Chat.blockMember (Int64 blockPlayerId, onBlockMember listener) |
Block member The current user blocks a specific member. More... | |
static void | hive.Chat.unblockMember (Int64 blockPlayerId, onUnblockMember listener) |
Unblock member The current user unblocks a specific member. More... | |
The Hive Chat service provides essential features for seamless chat within the app, including real-time chat, group chat, one-on-one chat, and user blocking functionality.
enum hive.ChannelType |
Channel Type.
enum hive.SortType |
Sort Type
Sorting value for the retrieved channel list.
|
static |
Detects events between the connected user and the Hive chat server channel, and listens for change events.
Detects events between the connected user and the Hive chat server channel, and listens for change events.
uniqueKey | custom unique key |
channelHandler | ChannelHandler channel event handler |
|
static |
Detects the connection status with the Hive chat server and listens for status change events.
Detects the connection status with the Hive chat server and listens for status change events.
uniqueKey | custom unique key |
connectionHandler | ConnectionHandler connection status handler |
|
static |
Registers a listener that detects and receives custom data for the connected user on the Hive chat server.
Registers a CustomDataHandler using a unique key to receive custom data related to the specified user.
uniqueKey | custom unique key |
customDataHandler | CustomDataHandler for custom data events |
|
static |
Detects 1:1 message events delivered to the connected user on the Hive chat server and listens for these events.
Detects 1:1 message events delivered to the connected user on the Hive chat server and listens for these events.
uniqueKey | custom unique key |
directMessageHandler | DirectMessageHandler 1:1 message event handler |
|
static |
Registers a listener that detects and receives user-related events on the connected Hive chat server.
Registers a UserHandler using a unique key to detect and receive events such as DirectMessage and NoticeMessage for the specified user.
uniqueKey | custom unique key |
userHandler | UserHandler for user-related events |
|
static |
Block member
The current user blocks a specific member.
blockPlayerId | The playerId of the member the user wants to block |
listener | onBlockMember |
|
static |
The result after attempting to connect to the Hive chat server
This is the first API that must be called before accessing the Hive chat feature.
It attempts to connect to the Hive chat server based on the authenticated user information.
By default, if the connection is not established within 60 seconds, ResultAPI.Code.ChatResponseError will occur.
The maximum time for connecting to the Hive chat server can be reconfigured using the Configuration.setChatConnectionTimeout() API.
To detect the connection status and receive status change events, you need to register the event handler with Chat.addConnectionHandler.
listener | onConnect |
|
static |
[Deprecated] The result after attempting to connect to the Hive chat server
This is the first API that must be called before accessing the Hive chat feature.
It attempts to connect to the Hive chat server based on the authenticated user information.
Please use {connect(onConnect)} instead.
By default, if the connection is not established within 60 seconds, ResultAPI.Code.ChatResponseError will occur.
The maximum time for connecting to the Hive chat server can be reconfigured using the Configuration.setChatConnectionTimeout() API.
To detect the connection status and receive status change events, you need to register the event handler with Chat.addConnectionHandler.
extraData | User settings data (e.g., nickname) |
listener | onConnect |
|
static |
Create channel
Creates a new conversation channel.
param | object containing the parameters to create the channel |
listener | onCreateChannel |
|
static |
Delete channel
Deletes the channel.
channelId | ID of the channel to delete |
listener | onDeleteChannel |
|
static |
Disconnects from the Hive chat server
This API is automatically called when the authenticated user information is signed out.
listener | onDisconnect |
|
static |
Enter channel
Enters the channel.
param | The information of the channel to enter |
listener | onEnterChannel |
|
static |
Exit Channel
Exit the channel the current user is participating in.
If the channel owner leaves, the channel will be deleted.
channelId | ID of the channel to exit |
listener | onExitChannel |
|
static |
Get blocked member
The current user retrieves the list of members blocked.
listener | onGetBlockMembers |
|
static |
Retrieve channel information
Retrieves the detailed information of a specific channel.
channelId | ID of the channel to retrieve information |
listener | onGetChannelInfo |
|
static |
Retrieve channel participant information
Retrieves the participant information of a specific channel.
channelId | ID of the channel to retrieve participant information |
listener | onGetChannelMembers |
|
static |
Retrieve list of currently created channels
Retrieves the list of currently created channels.
You can configure a GetChannelsParams object to set filters for the channels you want to retrieve.
param | object to filter the channels |
listener | onGetChannels |
|
static |
Retrieve channels the user is participating in
Retrieves the list of channels the current user is participating in.
listener | onGetChannelsByUser |
|
static |
Retrieves the current user's Hive chat server connection status
Checks the connection status to the Hive chat server.
delegate void hive.Chat.onBlockMember | ( | ResultAPI | result | ) |
The result after blocking a member.
result | API call result
|
delegate void hive.Chat.onChannelSendMessage | ( | ResultAPI | result, |
ChannelSendMessageParams | retryParams | ||
) |
Listener for delivering the result after sending a channel message
result | API call result
|
delegate void hive.Chat.onConnect | ( | ResultAPI | result | ) |
the result after connecting to the Hive chat server
delegate void hive.Chat.onCreateChannel | ( | ResultAPI | result | ) |
the result after channel creation
result | API call result
|
delegate void hive.Chat.onDeleteChannel | ( | ResultAPI | result | ) |
The result after deleting the channel.
result | API call result
|
delegate void hive.Chat.onDirectSendMessage | ( | ResultAPI | result, |
DirectSendMessageParams | retryParams | ||
) |
Listener for delivering the result after sending a 1:1 message
result | API call result
|
delegate void hive.Chat.onDisconnect | ( | ResultAPI | result | ) |
the result after disconnecting from the Hive chat server
result | API call result
|
delegate void hive.Chat.onEixtChannel | ( | ResultAPI | result | ) |
The result after exiting the channel.
result | API call result
|
delegate void hive.Chat.onEnterChannel | ( | ResultAPI | result | ) |
The result after entering the channel.
result | API call result
|
delegate void hive.Chat.onGetBlockMembers | ( | ResultAPI | result, |
List< BlockMember > | blockMembers | ||
) |
The result after retrieving the list of blocked members.
result | API call result
|
blockMembers | List of blocked members |
delegate void hive.Chat.onGetChannelInfo | ( | ResultAPI | result, |
Channel | channel, | ||
List< Member > | members | ||
) |
The result after retrieving channel information.
result | API call result
|
channel | Channel information (may be null) |
members | List of members in the channel |
The result after retrieving the list of channel members.
result | API call result
|
members | List of members in the channel |
delegate void hive.Chat.onGetChannels | ( | ResultAPI | result, |
List< Channel > | channels, | ||
ChannelPage | channelPage | ||
) |
The result after retrieving the list of channels.
result | API call result
|
channels | List of channels retrieved |
channelPage | Channel page information |
The result after retrieving the list of channels by user.
result | API call result
|
channels | List of channels associated with the user |
delegate void hive.Chat.onReconnect | ( | ResultAPI | result, |
List< String > | channelIds, | ||
List< String > | failChannelIds | ||
) |
the result after reconnecting to the Hive chat server
channelIds | successfully reconnected channel ID list |
failChannelIds | failed to reconnect channel ID list |
delegate void hive.Chat.onUnblockMember | ( | ResultAPI | result | ) |
The result after unblocking a member.
result | API call result
|
|
static |
Reconnect to Hive chat server
Reconnects to the Hive chat server.
The reconnection will rejoin the previously connected channels if the disconnection occurred less than 10 minutes ago.
If the last disconnection was more than 10 minutes ago or there is no previous connection record, this will behave the same as connect.
To detect connection status and receive status change events, you must register the Chat.addConnectionHandler event handler.
listener | onReconnect callback |
|
static |
Removes the registered channel event handler (addChannelHandler)
Removes the registered channel event handler.
uniqueKey | custom unique key |
|
static |
Removes the registered connection event handler (addConnectionHandler)
Removes the registered connection event handler.
uniqueKey | custom unique key |
|
static |
Removes the registered custom data event listener (addCustomDataHandler)
Removes the registered CustomDataHandler by uniqueKey, and stops receiving custom data related to the specified user.
uniqueKey | custom unique key |
|
static |
Removes the registered 1:1 message event handler (addDirectMessageHandler)
Removes the registered 1:1 message event handler.
uniqueKey | custom unique key |
|
static |
Removes the registered user event listener (addUserHandler)
Removes the registered UserHandler by uniqueKey, and stops receiving user-related events such as DirectMessage and NoticeMessage.
uniqueKey | custom unique key |
|
static |
Send channel message
Sends a message to the channel the user has joined, and allows configuring message transmission details by creating a ChannelSendMessageParams object.
To receive the sent channel message, you need to register an event handler using Chat.addChannelHandler.
param | ChannelSendMessageParams message sending details |
|
static |
Send channel message
Sends a message to the channel the user has joined, with details configured using a ChannelSendMessageParams object.
The result of the message sending will be received through the provided onChannelSendMessage callback.
To receive channel messages globally, you should register an event handler using Chat.addChannelHandler.
param | ChannelSendMessageParams message sending details |
|
static |
Send 1:1 message
Sends a message to a specific target user, and allows configuring message transmission details by creating a DirectSendMessageParams object.
To receive the sent 1:1 message, you need to register an event handler using Chat.addDirectMessageHandler.
param | DirectSendMessageParams message sending details |
|
static |
Send 1:1 message
Sends a message to a specific target user, with details configured using a DirectSendMessageParams object.
The result of the message sending will be received through the provided onDirectSendMessage callback.
To receive channel messages globally, you should register an event handler using Chat.addDirectMessageHandler.
param | DirectSendMessageParams message sending details |
|
static |
Unblock member
The current user unblocks a specific member.
blockPlayerId | The playerId of the member the user wants to unblock |
listener | onUnblockMember |