ConversationsClient

interface ConversationsClient

Conversations client - main entry point for the Conversations SDK.

Types

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

Functions

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