Conversations Android SDK  1.2.0
com.twilio.conversations.ConversationsClient.Properties.Builder Interface Reference

Builder class for client properties. More...

Public Member Functions

Builder setRegion (String region)
 Select Twilio server region to connect to. More...
 
Builder setUseProxy (boolean useProxy)
 If useProxy flag is true ConversationsClient will try to read and apply proxy settings in the following order: More...
 
Builder setDeferCertificateTrustToPlatform (boolean defer)
 Defer certificate trust decisions to Android OS, overriding the default of certificate pinning for Twilio back-end connections. More...
 
Builder setCommandTimeout (int commandTimeout)
 Set timeout for commands which SDK sends over network (i.e. More...
 
ConversationsClient.Properties createProperties ()
 Create Properties object from this Builder. More...
 

Detailed Description

Builder class for client properties.

Member Function Documentation

ConversationsClient.Properties com.twilio.conversations.ConversationsClient.Properties.Builder.createProperties ( )

Create Properties object from this Builder.

Returns
New Properties object to use with Client construction.
Builder com.twilio.conversations.ConversationsClient.Properties.Builder.setCommandTimeout ( int  commandTimeout)

Set timeout for commands which SDK sends over network (i.e.

Conversation#sendMessage, Conversation#join etc). StatusListener#onError will be called when timeout is reached.

In case of bad connectivity SDK retries to send command until timeout is reached. Timeout could occur earlier than specified time if there is no enough time to make one more attempt.

The default value is DEFAULT_COMMAND_TIMEOUT.

Parameters
commandTimeouttimeout in milliseconds. Must be greater than or equal to MIN_COMMAND_TIMEOUT
Returns
Self for chaining.
Exceptions
IllegalArgumentExceptionif passed value less than MIN_COMMAND_TIMEOUT
Builder com.twilio.conversations.ConversationsClient.Properties.Builder.setDeferCertificateTrustToPlatform ( boolean  defer)

Defer certificate trust decisions to Android OS, overriding the default of certificate pinning for Twilio back-end connections.

Twilio client SDKs utilize certificate pinning to prevent man-in-the-middle attacks against your connections to our services. Customers in certain very specific environments may need to opt-out of this if custom certificate authorities must be allowed to intentionally intercept communications for security or policy reasons.

Setting this property to true for a Conversations Client instance will defer to Android to establish whether or not a given connection is providing valid and trusted TLS certificates.

Keeping this property at its default value of false allows the Twilio client SDK to determine trust when communicating with our servers.

The default value is false.

Parameters
deferTrue to use Android OS certficate trust store, false to use bundled with the SDK.
Returns
Self for chaining.
Builder com.twilio.conversations.ConversationsClient.Properties.Builder.setRegion ( String  region)

Select Twilio server region to connect to.

Conversations instances exist in specific regions, so this should only be changed if needed. Defaults to us1.

Parameters
regionRegion such as us1 or ie1.
Returns
Self for chaining.
Builder com.twilio.conversations.ConversationsClient.Properties.Builder.setUseProxy ( boolean  useProxy)

If useProxy flag is true ConversationsClient will try to read and apply proxy settings in the following order:

  1. If there is no proxysettings.properties file in the assets folder of your app then android system proxy settings will be applied.
  2. If the proxysettings.properties file exists in the assets folder of your app then proxy configuration will be read from it and android system settings will be ignored.
  3. If proxy settings cannot be read either from the proxysettings.properties file and from android system settings ConversationsClient will use direct connection.

If this flag is false any proxy settings will be ignored and direct connection will be used.

In current version connection via proxy server is not supported for media. So media uploading always uses direct connection.

Parameters
useProxytrue for using proxy server, false for using direct connection.
Returns
Self for chaining.

Example of the proxysettings.properties file

host=192.168.8.108
port=8080
user=myUser
password=myPassword