ConversationsClient

interface ConversationsClient

Conversations client - main entry point for the Conversations SDK.

Types

ConnectionState
Link copied to clipboard
enum ConnectionState
Represents underlying twilsock connection state.
ConversationBuilder
Link copied to clipboard
interface ConversationBuilder
Helper to create new conversation with provided data.
FCMToken
Link copied to clipboard
open class FCMToken
Class which represents token received by application from the Firebase Cloud Messaging service.
LogLevel
Link copied to clipboard
enum LogLevel
Log level constants for passing to setLogLevel.
Properties
Link copied to clipboard
interface Properties
Properties for client initialization configuration
SynchronizationStatus
Link copied to clipboard
enum SynchronizationStatus
Represents client initialization status.

Functions

addListener
Link copied to clipboard
abstract fun addListener(listener: ConversationsClientListener)
Method to add listener for this Client.
conversationBuilder
Link copied to clipboard
abstract fun conversationBuilder(): ConversationsClient.ConversationBuilder
Get ConversationBuilder to create conversation with options.
create
Link copied to clipboard
open fun create(context: Context, token: String, properties: ConversationsClient.Properties, listener: CallbackListener<ConversationsClient>)
Creates a new Conversations client instance with a token manager and client properties.
createConversation
Link copied to clipboard
abstract fun createConversation(friendlyName: String, listener: CallbackListener<Conversation>)
Create a conversation with friendly name.
getAndSubscribeUser
Link copied to clipboard
abstract fun getAndSubscribeUser(identity: String, listener: CallbackListener<User>)
Get user based on user identity and subscribe to real-time updates for this user.
getConnectionState
Link copied to clipboard
abstract fun getConnectionState(): ConversationsClient.ConnectionState
getConversation
Link copied to clipboard
abstract fun getConversation(conversationSidOrUniqueName: String, listener: CallbackListener<Conversation>)
Retrieves a conversation with the specified SID or unique name.
getMyConversations
Link copied to clipboard
abstract fun getMyConversations(): List<Conversation>
Request list of user's joined conversations.
getMyIdentity
Link copied to clipboard
abstract fun getMyIdentity(): String
Get user identity for current user
getMyUser
Link copied to clipboard
abstract fun getMyUser(): User
Get logged in User object.
getParticipantsByIdentity
Link copied to clipboard
abstract fun getParticipantsByIdentity(identity: String): List<Participant>
Get list of all Conversation participants with a given identity.
getProperties
Link copied to clipboard
abstract fun getProperties(): ConversationsClient.Properties
Get properties for current client
getSdkVersion
Link copied to clipboard
open fun getSdkVersion(): String
Returns the version of the Conversations SDK.
getSubscribedUsers
Link copied to clipboard
abstract fun getSubscribedUsers(): List<User>
Get a list of currently subscribed User objects.
getTemporaryContentUrlsForMedia
Link copied to clipboard
abstract fun getTemporaryContentUrlsForMedia(media: List<Media>, listener: CallbackListener<Map<String, String>>): CancellationToken
Get content URLs for all media attachments in the given set using single network request.
getTemporaryContentUrlsForMediaSids
Link copied to clipboard
abstract fun getTemporaryContentUrlsForMediaSids(mediaSids: List<String>, listener: CallbackListener<Map<String, String>>): CancellationToken
Get content URLs for all media attachments in the given set using single network request.
handleNotification
Link copied to clipboard
abstract fun handleNotification(notification: NotificationPayload)
Queue the incoming notification with the conversations library for processing.
isReachabilityEnabled
Link copied to clipboard
abstract fun isReachabilityEnabled(): Boolean
Get reachability service status.
registerFCMToken
Link copied to clipboard
abstract fun registerFCMToken(token: ConversationsClient.FCMToken, listener: StatusListener)
Register Firebase Messaging token for push notification updates.
removeAllListeners
Link copied to clipboard
abstract fun removeAllListeners()
Method to remove all listeners from this Client.
removeListener
Link copied to clipboard
abstract fun removeListener(listener: ConversationsClientListener)
Method to remove listener from this Client.
setLogLevel
Link copied to clipboard
open fun setLogLevel(level: ConversationsClient.LogLevel)
Set verbosity level for log messages to be printed to android logcat.
shutdown
Link copied to clipboard
abstract fun shutdown()
Cleanly shuts down the messaging client when you are done with it.
unregisterFCMToken
Link copied to clipboard
abstract fun unregisterFCMToken(token: ConversationsClient.FCMToken, listener: StatusListener)
Unregister from Firebase Messaging updates.
updateToken
Link copied to clipboard
abstract fun updateToken(token: String, listener: StatusListener)
Method to update the authentication token for this client.