public static class

ConversationClient.ConversationClientBuilder

extends ConversationClient.ConversationClientConfig
java.lang.Object
   ↳ com.nexmo.sdk.conversation.client.ConversationClient.ConversationClientConfig
     ↳ com.nexmo.sdk.conversation.client.ConversationClient.ConversationClientBuilder

Class Overview

API for creating ConversationClient instances. Acquire a ConversationClient, based on the following mandatory params:

  • applicationContext: The application context.

Example usage:

     // Create a ConversationClient using the ConversationClientBuilder.
     ConversationClient myConversationClient = new ConversationClient.ConversationClientBuilder()
        .context(myAppContext)
        .build();
 

Summary

[Expand]
Inherited Fields
From class com.nexmo.sdk.conversation.client.ConversationClient.ConversationClientConfig
Public Constructors
ConversationClientBuilder()
Public Methods
ConversationClient.ConversationClientBuilder autoReconnect(boolean autoReconnect)
Set automatic reconnect policy.
ConversationClient build()
Build a ConversationClient, based on the following mandatory params:
  • applicationContext: The application context.
ConversationClient.ConversationClientBuilder context(Context context)
ConversationClient.ConversationClientBuilder enableCrashReporting(boolean enableCrashReporting)
ConversationClient.ConversationClientBuilder endpointPath(String path)
ConversationClient.ConversationClientBuilder environmentHost(String environmentHost)
ConversationClient.ConversationClientBuilder flushPending(boolean flushPending)
When new session is being created pending operations from previous app start will be flushed on login process
ConversationClient.ConversationClientBuilder imageProcessingServiceUrl(String ipsUrl)
ConversationClient.ConversationClientBuilder logLevel(int logLevel)
Set log level for SDK.
ConversationClient.ConversationClientBuilder onMainThread(boolean useMainThread)
User can specify thread on which callback will be fired
[Expand]
Inherited Methods
From class com.nexmo.sdk.conversation.client.ConversationClient.ConversationClientConfig
From class java.lang.Object

Public Constructors

public ConversationClientBuilder ()

Public Methods

public ConversationClient.ConversationClientBuilder autoReconnect (boolean autoReconnect)

Set automatic reconnect policy.

By default if the connection gets lost, SDK is automatically reconnecting exponentially.

public ConversationClient build ()

Build a ConversationClient, based on the following mandatory params:

  • applicationContext: The application context.

Returns
Throws
ConversationClientException A ConversationClientException if any of the mandatory params are not supplied.

public ConversationClient.ConversationClientBuilder context (Context context)

public ConversationClient.ConversationClientBuilder enableCrashReporting (boolean enableCrashReporting)

public ConversationClient.ConversationClientBuilder endpointPath (String path)

public ConversationClient.ConversationClientBuilder environmentHost (String environmentHost)

public ConversationClient.ConversationClientBuilder flushPending (boolean flushPending)

When new session is being created pending operations from previous app start will be flushed on login process

Parameters
flushPending true if pending operations have to be flushed. Default is false

public ConversationClient.ConversationClientBuilder imageProcessingServiceUrl (String ipsUrl)

public ConversationClient.ConversationClientBuilder logLevel (int logLevel)

Set log level for SDK. Default is ASSERT - minimal output. For maximum verbosity use VERBOSE

Parameters
logLevel required log level constant from Log android.util.Log

public ConversationClient.ConversationClientBuilder onMainThread (boolean useMainThread)

User can specify thread on which callback will be fired

Parameters
useMainThread if true main application thread will be used