public class

ChatCore

extends Object
java.lang.Object
   ↳ com.salesforce.android.chat.core.ChatCore

Class Overview

Entry point for configuring and creating a Service SDK Chat Session.

Summary

Public Methods
static ChatCore configure(ChatConfiguration configuration)
Create a new ChatCore instance with the provided configuration that will allow you to create ChatClient instances and start new chat sessions.
static AgentAvailabilityClient configureAgentAvailability(ChatConfiguration configuration)
Create a new AgentAvailabilityClient instance with the provided configuration that will allow you to check the availability status of agents on the getButtonId()
Async<ChatClient> createClient(Context context)
Create a new ChatClient, which represents an active chat session.
static Boolean isActive()
Returns whether a chat core session is currently active.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static ChatCore configure (ChatConfiguration configuration)

Create a new ChatCore instance with the provided configuration that will allow you to create ChatClient instances and start new chat sessions.

Parameters
configuration ChatConfiguration
Returns
  • A new ChatCore instance

public static AgentAvailabilityClient configureAgentAvailability (ChatConfiguration configuration)

Create a new AgentAvailabilityClient instance with the provided configuration that will allow you to check the availability status of agents on the getButtonId()

Parameters
configuration ChatConfiguration
Returns

public Async<ChatClient> createClient (Context context)

Create a new ChatClient, which represents an active chat session. This will automatically start the ChatService and attempt to establish a Chat session with an Agent. Once the ChatClient instance is provided to you asynchronously to an com.salesforce.android.service.common.liveagentclient.response.message.AsyncResult handler you will be able to interact with the Chat session.

Parameters
context A valid Context instance
Returns
  • An Async instance

public static Boolean isActive ()

Returns whether a chat core session is currently active. Chat can only support 1 active chat session at any given time. As a result it is important to ensure that any operations that rely on the chat session or a valid ChatCore instance be prevented from initializing unnecessarily.

Returns