Chat Android SDK  5.1.1
com.twilio.chat.ChatClient.Properties.Builder Class Reference

Builder class for client properties. More...

Public Member Functions

Builder setRegion (String region)
 Select Twilio server region to connect to. 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...
 
Properties createProperties ()
 Create Properties object from this Builder. More...
 

Detailed Description

Builder class for client properties.

Member Function Documentation

Properties com.twilio.chat.ChatClient.Properties.Builder.createProperties ( )

Create Properties object from this Builder.

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

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

Messages#sendMessage, Channel#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.chat.ChatClient.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 Chat 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.chat.ChatClient.Properties.Builder.setRegion ( String  region)

Select Twilio server region to connect to.

Chat 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.