Conversations Android SDK
1.2.0
|
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... | |
Builder class for client properties.
ConversationsClient.Properties com.twilio.conversations.ConversationsClient.Properties.Builder.createProperties | ( | ) |
Create Properties object from this Builder.
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.
commandTimeout | timeout in milliseconds. Must be greater than or equal to MIN_COMMAND_TIMEOUT |
IllegalArgumentException | if 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
.
defer | True to use Android OS certficate trust store, false to use bundled with the SDK. |
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
.
region | Region such as us1 or ie1 . |
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:
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.
useProxy | true for using proxy server, false for using direct connection. |
Example of the proxysettings.properties file