LiveLikeChatSession

LiveLikeChatSession

interface LiveLikeChatSession

Created by Shivansh Mittal on 2020-04-08.

Fields

Name Description
abstract var getActiveChatRoom: ()->String

The current active chat room, it is the last entered chat room

abstract var shouldDisplayAvatar: Boolean

Set the value of visibility of chat avatar

abstract var avatarUrl: String?

Avatar Image Url

Methods

getPlayheadTime

abstract fun getPlayheadTime(): EpochTime

Return the playheadTime for this session.

ReturnValue

Name Description
EpochTime

pause

abstract fun pause()

Pause the current Chat and widget sessions. This generally happens when ads are presented

ReturnValue

Name Description
Unit

resume

abstract fun resume()

Resume the current Chat and widget sessions. This generally happens when ads are completed

ReturnValue

Name Description
Unit

close

abstract fun close()

Closes the current session.

ReturnValue

Name Description
Unit

joinChatRoom

abstract fun joinChatRoom(chatRoomId: String, timestamp: Long)

Join a Chat Room, membership will be created for this room

Parameters

Name Description
chatRoomId: String
timestamp: Long

ReturnValue

Name Description
Unit

leaveChatRoom

abstract fun leaveChatRoom(chatRoomId: String)

Leave a Chat Room, membership will be cancelled with this room

Parameters

Name Description
chatRoomId: String

ReturnValue

Name Description
Unit

enterChatRoom

abstract fun enterChatRoom(chatRoomId: String)

Enter a Chat Room, the last entered Chat Room will be the active one

Parameters

Name Description
chatRoomId: String

ReturnValue

Name Description
Unit

exitChatRoom

abstract fun exitChatRoom(chatRoomId: String)

Exit the specified Chat Room

Parameters

Name Description
chatRoomId: String

ReturnValue

Name Description
Unit

exitAllConnectedChatRooms

abstract fun exitAllConnectedChatRooms()

Exit all the Connected Chat Rooms

ReturnValue

Name Description
Unit

getMessageCount

abstract fun getMessageCount(chatRoomId: String, startTimestamp: Long, callback: LiveLikeCallback<Byte>)

Returns the number of messages published on a chatroom since a given time

Parameters

Name Description
chatRoomId: String
startTimestamp: Long
callback: LiveLikeCallback<Byte>

ReturnValue

Name Description
Unit

setMessageListener

abstract fun setMessageListener(messageListener: MessageListener)

Register a message count listner for the specified Chat Room

Parameters

Name Description
messageListener: MessageListener

ReturnValue

Name Description
Unit