BVMessageManager

class BVMessageManager(chatRoomToken: String, chatRoomManager: ChatRoomManager, refreshToken: String?, mqttManager: MqttManager, eventListener: EventListener?, messageListener: MessageListener?) : MessageManager

Manages the connection and communication with the chat room and MQTT broker.

Constructors

Link copied to clipboard
constructor(chatRoomToken: String, chatRoomManager: ChatRoomManager, refreshToken: String?, mqttManager: MqttManager, eventListener: EventListener?, messageListener: MessageListener?)

Types

Link copied to clipboard
data class Builder(chatRoomToken: String, var refreshToken: String? = null)

Builder class for creating a BVMessageManager instance.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun blockUser(userId: String, userDeviceId: String, userCustomName: String)

Blocks a user in the chat room.

Link copied to clipboard
open override fun connect()

Connects to the chat room and MQTT broker.

Link copied to clipboard
open override fun deleteMessage(messageId: String, userCustomName: String, timestampReceivedAt: String?)

Deletes a message in the chat room.

Link copied to clipboard
open override fun disconnect()

Disconnects from the chat room and MQTT broker.

Link copied to clipboard
open override fun getChatHistory(beforeAt: String?, limit: Int?, afterAt: String?, fromOldest: Boolean?, types: Array<String>?)

Retrieves the chat history.

Link copied to clipboard
open override fun getMessages(beforeAt: String?, limit: Int?, afterAt: String?, fromOldest: Boolean?, types: Array<String>?)

Retrieves messages from the chat room.

Link copied to clipboard
open override fun muteChatRoom()

Mutes the chat room.

Link copied to clipboard
open override fun pinMessage(messageId: String, text: String, userId: String, userDeviceId: String, userCustomName: String)

Pins a message in the chat room.

Link copied to clipboard
open override fun publishCountableCustomMessage(key: String, message: String?)

Publishes a countable custom message to the chat room.

Link copied to clipboard
open override fun publishCustomMessage(customMessage: String)

Publishes a custom message to the chat room.

Link copied to clipboard
open override fun publishMessage(message: String)

Publishes a message to the chat room.

Link copied to clipboard
open override fun refreshToken()

Refreshes the chat room token.

Link copied to clipboard
open override fun release()

Releases resources and cancels ongoing operations.

Link copied to clipboard
open override fun unblockUser(userId: String)

Unblocks a user in the chat room.

Link copied to clipboard
open override fun unmuteChatRoom()

Unmutes the chat room.

Link copied to clipboard
open override fun unpinMessage(messageId: String)

Unpins a message in the chat room.

Link copied to clipboard
open override fun updateUser(newCustomName: String)

Updates the user information.

Link copied to clipboard
open override fun updateViewerInfo(enabled: Boolean, customName: String)

Updates the viewer information.