public interface

ChatUIClient

com.salesforce.android.chat.ui.ChatUIClient

Class Overview

Public API for Chat UI

Summary

Public Methods
abstract ChatUIClient addPreChatUIListener(PreChatUIListener preChatUIListener)
Register a PreChatUIListener with this ChatUIClient to receive information about the PreChat UI.
abstract ChatUIClient addSessionStateListener(SessionStateListener sessionStateListener)
Register a SessionStateListener with this ChatUIClient to receive state changes for the chat session.
abstract void endChatSession()
End the Chat Session immediately.
abstract ChatSessionState getCurrentSessionState()
Returns the current state of the chat session.
abstract ChatUIClient removePreChatUIListener(PreChatUIListener preChatUIListener)
Unregister a PreChatUIListener from this ChatUIClient instance.
abstract ChatUIClient removeSessionStateListener(SessionStateListener sessionStateListener)
Unregister a SessionStateListener from this ChatClient instance.
abstract Async<Boolean> startChatSession(FragmentActivity activity)
Start a Chat Session.

Public Methods

public abstract ChatUIClient addPreChatUIListener (PreChatUIListener preChatUIListener)

Register a PreChatUIListener with this ChatUIClient to receive information about the PreChat UI.

Parameters
preChatUIListener A PreChatUIListener instance
Returns
  • A reference to this ChatClient instance for syntax chaining

public abstract ChatUIClient addSessionStateListener (SessionStateListener sessionStateListener)

Register a SessionStateListener with this ChatUIClient to receive state changes for the chat session.

Parameters
sessionStateListener A SessionStateListener instance
Returns
  • A reference to this ChatUIClient instance for syntax chaining

public abstract void endChatSession ()

End the Chat Session immediately.

public abstract ChatSessionState getCurrentSessionState ()

Returns the current state of the chat session.

Returns
  • Current session state.
See Also

public abstract ChatUIClient removePreChatUIListener (PreChatUIListener preChatUIListener)

Unregister a PreChatUIListener from this ChatUIClient instance.

Parameters
preChatUIListener A PreChatUIListener instance
Returns
  • A reference to this ChatClient instance for syntax chaining

public abstract ChatUIClient removeSessionStateListener (SessionStateListener sessionStateListener)

Unregister a SessionStateListener from this ChatClient instance.

Parameters
sessionStateListener A SessionStateListener instance
Returns
  • A reference to this ChatClient instance for syntax chaining

public abstract Async<Boolean> startChatSession (FragmentActivity activity)

Start a Chat Session.

The onResult(Async.ResultHandler) will provide a boolean result which if true signals that a session has been successfully started.

If the result is false then the session was aborted before it was started. An example for how this could happen would be a user deciding not to proceed past the PreChat phase.