HIVE SDK for Unity3D

Classes | Enumerations | Functions
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...

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...
 

Detailed Description

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.


Enumeration Type Documentation

◆ ChannelType

Channel Type.

◆ SortType

Sort Type
Sorting value for the retrieved channel list.

Function Documentation

◆ addChannelHandler()

static void hive.Chat.addChannelHandler ( String  uniqueKey,
ChannelHandler  channelHandler 
)
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.

Parameters
uniqueKeycustom unique key
channelHandlerChannelHandler channel event handler

◆ addConnectionHandler()

static void hive.Chat.addConnectionHandler ( String  uniqueKey,
ConnectionHandler  connectionHandler 
)
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.

Parameters
uniqueKeycustom unique key
connectionHandlerConnectionHandler connection status handler

◆ addCustomDataHandler()

static void hive.Chat.addCustomDataHandler ( String  uniqueKey,
CustomDataHandler  customDataHandler 
)
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.

Parameters
uniqueKeycustom unique key
customDataHandlerCustomDataHandler for custom data events

◆ addDirectMessageHandler()

static void hive.Chat.addDirectMessageHandler ( String  uniqueKey,
DirectMessageHandler  directMessageHandler 
)
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.

Parameters
uniqueKeycustom unique key
directMessageHandlerDirectMessageHandler 1:1 message event handler

◆ addUserHandler()

static void hive.Chat.addUserHandler ( String  uniqueKey,
UserHandler  userHandler 
)
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.

Parameters
uniqueKeycustom unique key
userHandlerUserHandler for user-related events

◆ blockMember()

static void hive.Chat.blockMember ( Int64  blockPlayerId,
onBlockMember  listener 
)
static

Block member
The current user blocks a specific member.


Parameters
blockPlayerIdThe playerId of the member the user wants to block
listeneronBlockMember

◆ connect() [1/2]

static void hive.Chat.connect ( onConnect  listener)
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.

Parameters
listeneronConnect

◆ connect() [2/2]

static void hive.Chat.connect ( String  extraData,
onConnect  listener 
)
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.

Parameters
extraDataUser settings data (e.g., nickname)
listeneronConnect
Deprecated:
Deprecated since v25.2.0, use {connect(onConnect)} instead

◆ createChannel()

static void hive.Chat.createChannel ( CreateChannelParams  param,
onCreateChannel  listener 
)
static

Create channel
Creates a new conversation channel.


Parameters
paramobject containing the parameters to create the channel
listeneronCreateChannel

◆ deleteChannel()

static void hive.Chat.deleteChannel ( String  channelId,
onDeleteChannel  listener 
)
static

Delete channel
Deletes the channel.


Parameters
channelIdID of the channel to delete
listeneronDeleteChannel

◆ disconnect()

static void hive.Chat.disconnect ( onDisconnect  listener)
static

Disconnects from the Hive chat server
This API is automatically called when the authenticated user information is signed out.


Parameters
listeneronDisconnect

◆ enterChannel()

static void hive.Chat.enterChannel ( EnterChannelParams  param,
onEnterChannel  listener 
)
static

Enter channel
Enters the channel.


Parameters
paramThe information of the channel to enter
listeneronEnterChannel

◆ exitChannel()

static void hive.Chat.exitChannel ( String  channelId,
onEixtChannel  listener 
)
static

Exit Channel
Exit the channel the current user is participating in.

If the channel owner leaves, the channel will be deleted.

Parameters
channelIdID of the channel to exit
listeneronExitChannel

◆ getBlockMembers()

static void hive.Chat.getBlockMembers ( onGetBlockMembers  listener)
static

Get blocked member
The current user retrieves the list of members blocked.


Parameters
listeneronGetBlockMembers

◆ getChannelInfo()

static void hive.Chat.getChannelInfo ( String  channelId,
onGetChannelInfo  listener 
)
static

Retrieve channel information
Retrieves the detailed information of a specific channel.


Parameters
channelIdID of the channel to retrieve information
listeneronGetChannelInfo

◆ getChannelMembers()

static void hive.Chat.getChannelMembers ( String  channelId,
onGetChannelMembers  listener 
)
static

Retrieve channel participant information
Retrieves the participant information of a specific channel.


Parameters
channelIdID of the channel to retrieve participant information
listeneronGetChannelMembers

◆ getChannels()

static void hive.Chat.getChannels ( GetChannelsParams  param,
onGetChannels  listener 
)
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.

Parameters
paramobject to filter the channels
listeneronGetChannels

◆ getChannelsByUser()

static void hive.Chat.getChannelsByUser ( onGetChannelsByUser  listener)
static

Retrieve channels the user is participating in
Retrieves the list of channels the current user is participating in.


Parameters
listeneronGetChannelsByUser

◆ isConnected()

static Boolean hive.Chat.isConnected ( )
static

Retrieves the current user's Hive chat server connection status
Checks the connection status to the Hive chat server.


Returns
returns true if connected, false otherwise.

◆ onBlockMember()

delegate void hive.Chat.onBlockMember ( ResultAPI  result)

The result after blocking a member.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ onChannelSendMessage()

delegate void hive.Chat.onChannelSendMessage ( ResultAPI  result,
ChannelSendMessageParams  retryParams 
)

Listener for delivering the result after sending a channel message

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatResponseError Network error or other error
  • ResultAPI.Code.CommonUnknown Unknown error

◆ onConnect()

delegate void hive.Chat.onConnect ( ResultAPI  result)

the result after connecting to the Hive chat server

  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Already connected or Network error or other error

◆ onCreateChannel()

delegate void hive.Chat.onCreateChannel ( ResultAPI  result)

the result after channel creation

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ onDeleteChannel()

delegate void hive.Chat.onDeleteChannel ( ResultAPI  result)

The result after deleting the channel.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ onDirectSendMessage()

delegate void hive.Chat.onDirectSendMessage ( ResultAPI  result,
DirectSendMessageParams  retryParams 
)

Listener for delivering the result after sending a 1:1 message

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatResponseError Network error or other error
  • ResultAPI.Code.CommonUnknown Unknown error

◆ onDisconnect()

delegate void hive.Chat.onDisconnect ( ResultAPI  result)

the result after disconnecting from the Hive chat server

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ onEixtChannel()

delegate void hive.Chat.onEixtChannel ( ResultAPI  result)

The result after exiting the channel.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ onEnterChannel()

delegate void hive.Chat.onEnterChannel ( ResultAPI  result)

The result after entering the channel.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ onGetBlockMembers()

delegate void hive.Chat.onGetBlockMembers ( ResultAPI  result,
List< BlockMember blockMembers 
)

The result after retrieving the list of blocked members.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error
blockMembersList of blocked members

◆ onGetChannelInfo()

delegate void hive.Chat.onGetChannelInfo ( ResultAPI  result,
Channel  channel,
List< Member members 
)

The result after retrieving channel information.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error
channelChannel information (may be null)
membersList of members in the channel

◆ onGetChannelMembers()

delegate void hive.Chat.onGetChannelMembers ( ResultAPI  result,
List< Member members 
)

The result after retrieving the list of channel members.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error
membersList of members in the channel

◆ onGetChannels()

delegate void hive.Chat.onGetChannels ( ResultAPI  result,
List< Channel channels,
ChannelPage  channelPage 
)

The result after retrieving the list of channels.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error
channelsList of channels retrieved
channelPageChannel page information

◆ onGetChannelsByUser()

delegate void hive.Chat.onGetChannelsByUser ( ResultAPI  result,
List< Channel channels 
)

The result after retrieving the list of channels by user.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error
channelsList of channels associated with the user

◆ onReconnect()

delegate void hive.Chat.onReconnect ( ResultAPI  result,
List< String >  channelIds,
List< String >  failChannelIds 
)

the result after reconnecting to the Hive chat server

  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Already connected or Network error or other error
    Parameters
    channelIdssuccessfully reconnected channel ID list
    failChannelIdsfailed to reconnect channel ID list

◆ onUnblockMember()

delegate void hive.Chat.onUnblockMember ( ResultAPI  result)

The result after unblocking a member.

Parameters
resultAPI call result
  • ResultAPI.Code.Success Success
  • ResultAPI.Code.ChatNotConnected Hive Chat is not connected (reconnection required)
  • ResultAPI.Code.ChatNeedSignIn Hive is not signed in (sign-in check required)
  • ResultAPI.Code.ChatResponseError Network error or other error

◆ reconnect()

static void hive.Chat.reconnect ( onReconnect  listener)
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.

Parameters
listeneronReconnect callback

◆ removeChannelHandler()

static void hive.Chat.removeChannelHandler ( String  uniqueKey)
static

Removes the registered channel event handler (addChannelHandler)
Removes the registered channel event handler.


Parameters
uniqueKeycustom unique key

◆ removeConnectionHandler()

static void hive.Chat.removeConnectionHandler ( String  uniqueKey)
static

Removes the registered connection event handler (addConnectionHandler)
Removes the registered connection event handler.


Parameters
uniqueKeycustom unique key

◆ removeCustomDataHandler()

static void hive.Chat.removeCustomDataHandler ( String  uniqueKey)
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.


Parameters
uniqueKeycustom unique key

◆ removeDirectMessageHandler()

static void hive.Chat.removeDirectMessageHandler ( String  uniqueKey)
static

Removes the registered 1:1 message event handler (addDirectMessageHandler)
Removes the registered 1:1 message event handler.


Parameters
uniqueKeycustom unique key

◆ removeUserHandler()

static void hive.Chat.removeUserHandler ( String  uniqueKey)
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.


Parameters
uniqueKeycustom unique key

◆ sendMessage() [1/4]

static void hive.Chat.sendMessage ( ChannelSendMessageParams  param)
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.

Parameters
paramChannelSendMessageParams message sending details

◆ sendMessage() [2/4]

static void hive.Chat.sendMessage ( ChannelSendMessageParams  param,
onChannelSendMessage  listener 
)
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.

Parameters
paramChannelSendMessageParams message sending details

◆ sendMessage() [3/4]

static void hive.Chat.sendMessage ( DirectSendMessageParams  param)
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.

Parameters
paramDirectSendMessageParams message sending details

◆ sendMessage() [4/4]

static void hive.Chat.sendMessage ( DirectSendMessageParams  param,
onDirectSendMessage  listener 
)
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.

Parameters
paramDirectSendMessageParams message sending details

◆ unblockMember()

static void hive.Chat.unblockMember ( Int64  blockPlayerId,
onUnblockMember  listener 
)
static

Unblock member
The current user unblocks a specific member.


Parameters
blockPlayerIdThe playerId of the member the user wants to unblock
listeneronUnblockMember
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy