Conversation

interface Conversation

Container for conversation object.

To obtain a Conversation call createConversation, getConversation or get it from collections returned by getMyConversations.

Conversation is a relatively heavy-weight object. It receives state updates from the back-end in real time.

Types

Link copied to clipboard
enum ConversationState
Represents the various states of the conversation.
Link copied to clipboard
enum ConversationStatus
Represents the various statuses of the user with respect to the conversation.
Link copied to clipboard
interface MessageBuilder
Builder for preparing new message.
Link copied to clipboard
enum NotificationLevel
User's notification level on a conversation.
Link copied to clipboard
enum SynchronizationStatus
Indicates synchronization status for conversation.
Link copied to clipboard
interface UnsentMessage
Unsent message which is ready for sending.
Link copied to clipboard
enum UpdateReason
Indicates reason for conversation update.

Functions

Link copied to clipboard
abstract fun addListener(listener: ConversationListener)
Add a new ConversationListener for this Conversation.
Link copied to clipboard
abstract fun addParticipantByAddress(    address: String,     proxyAddress: String,     attributes: Attributes,     listener: StatusListener)
Add specified non chat participant to this conversation (sms, whatsapp participants etc).
Link copied to clipboard
abstract fun addParticipantByIdentity(    identity: String,     attributes: Attributes,     listener: StatusListener)
Add the participant with the specified username to this conversation.
Link copied to clipboard
abstract fun advanceLastReadMessageIndex(lastReadMessageIndex: Long, listener: CallbackListener<Long>)
Increase user last read message index for the conversation.
Link copied to clipboard
abstract fun destroy(listener: StatusListener)
Destroy the current conversation.
Link copied to clipboard
abstract fun getAttributes(): Attributes
Get custom attributes associated with the Conversation.
Link copied to clipboard
abstract fun getCreatedBy(): String
Get creator of the conversation.
Link copied to clipboard
abstract fun getDateCreated(): String
Get creation date of the conversation as an ISO 8601 string.
Link copied to clipboard
abstract fun getDateCreatedAsDate(): Date
Get creation date of the conversation.
Link copied to clipboard
abstract fun getDateUpdated(): String
Get update date of the conversation as an ISO 8601 string.
Link copied to clipboard
abstract fun getDateUpdatedAsDate(): Date
Get update date of the conversation.
Link copied to clipboard
abstract fun getFriendlyName(): String
Get friendly name of the conversation.
Link copied to clipboard
abstract fun getLastMessageDate(): Date
Get last message date in the conversation.
Link copied to clipboard
abstract fun getLastMessageIndex(): Long
Get last message's index in the conversation.
Link copied to clipboard
abstract fun getLastMessages(count: Int, listener: CallbackListener<List<Message>>)
Load last messages in conversation.
Link copied to clipboard
abstract fun getLastReadMessageIndex(): Long
Return user last read message index for the conversation.
Link copied to clipboard
abstract fun getLimits(): ConversationLimits
Link copied to clipboard
abstract fun getMessageByIndex(index: Long, listener: CallbackListener<Message>)
Get message object by known index.
Link copied to clipboard
abstract fun getMessagesAfter(    index: Long,     count: Int,     listener: CallbackListener<List<Message>>)
Fetch at most count messages including and subsequent to the specified index.
Link copied to clipboard
abstract fun getMessagesBefore(    index: Long,     count: Int,     listener: CallbackListener<List<Message>>)
Fetch at most count messages including and prior to the specified index.
Link copied to clipboard
abstract fun getMessagesCount(listener: CallbackListener<Long>)
Get total number of messages in the conversation.
Link copied to clipboard
abstract fun getNotificationLevel(): Any
The current user's notification level on this conversation.
Link copied to clipboard
abstract fun getParticipantByIdentity(identity: String): Participant
Get a conversation participant by identity.
Link copied to clipboard
abstract fun getParticipantBySid(sid: String): Participant
Get a conversation participant by sid.
Link copied to clipboard
abstract fun getParticipantsCount(listener: CallbackListener<Long>)
Get total number of participants in the conversation roster.
Link copied to clipboard
abstract fun getParticipantsList(): List<Participant>
Obtain an array of participants of this conversation.
Link copied to clipboard
abstract fun getSid(): String
Get unique identifier for this conversation.
Link copied to clipboard
abstract fun getState(): Any
Get activity state of this conversation.
Link copied to clipboard
abstract fun getStateDateUpdatedAsDate(): Date
Get update date of the ConversationState
Link copied to clipboard
abstract fun getStatus(): Any
Get the current user's participation status on this conversation.
Link copied to clipboard
abstract fun getSynchronizationStatus(): Conversation.SynchronizationStatus
Get the current synchronization status for conversation.
Link copied to clipboard
abstract fun getUniqueName(): String
Get unique name of the conversation.
Link copied to clipboard
abstract fun getUnreadMessagesCount(listener: CallbackListener<Long>)
Get number of unread messages in the conversation.
Link copied to clipboard
abstract fun join(listener: StatusListener)
Join the current user to this conversation.
Link copied to clipboard
abstract fun leave(listener: StatusListener)
Leave this conversation.
Link copied to clipboard
abstract fun prepareMessage(): Conversation.MessageBuilder
Prepares a new message to send into the conversation.
Link copied to clipboard
abstract fun removeAllListeners()
Remove all ConversationListeners for this Conversation.
Link copied to clipboard
abstract fun removeListener(listener: ConversationListener)
Remove ConversationListener for this Conversation.
Link copied to clipboard
abstract fun removeMessage(message: Message, listener: StatusListener)
Removes a message from the conversation.
Link copied to clipboard
abstract fun removeParticipant(participant: Participant, listener: StatusListener)
Remove specified participant from this conversation.
Link copied to clipboard
abstract fun removeParticipantByIdentity(identity: String, listener: StatusListener)
Remove the participant with the specified identity from this conversation.
Link copied to clipboard
abstract fun setAllMessagesRead(listener: CallbackListener<Long>)
Mark all messages in conversation as read.
Link copied to clipboard
abstract fun setAllMessagesUnread(listener: CallbackListener<Long>)
Mark all messages in conversation as unread.
Link copied to clipboard
abstract fun setAttributes(attributes: Attributes, listener: StatusListener)
Set attributes associated with this conversation.
Link copied to clipboard
abstract fun setFriendlyName(friendlyName: String, listener: StatusListener)
Update the friendly name for this conversation.
Link copied to clipboard
abstract fun setLastReadMessageIndex(lastReadMessageIndex: Long, listener: CallbackListener<Long>)
Set user last read message index for the conversation.
Link copied to clipboard
abstract fun setNotificationLevel(notificationLevel: Any, listener: StatusListener)
Set the user's notification level for the conversation.
Link copied to clipboard
abstract fun setUniqueName(uniqueName: String, listener: StatusListener)
Update the unique name for this conversation.
Link copied to clipboard
abstract fun typing()
Indicate that Participant is typing in this conversation.