Chat Android SDK  7.0.1
com.twilio.chat.ChatClient.Properties Class Reference

Properties for client initialization configuration. More...

Classes

class  Builder
 Builder class for client properties. More...
 

Public Member Functions

String getRegion ()
 Twilio server region to connect to. More...
 
boolean isUseProxy ()
 If useProxy flag is true ChatClient will try to read and apply proxy settings in the following order: More...
 
int getCommandTimeout ()
 

Static Public Attributes

static final int MIN_COMMAND_TIMEOUT = 10000
 Minimum valid command timeout value that could be passed into Builder#setCommandTimeout. More...
 
static final int DEFAULT_COMMAND_TIMEOUT = 90000
 Default command timeout value that could be passed into Builder#setCommandTimeout. More...
 

Detailed Description

Properties for client initialization configuration.

Member Function Documentation

int com.twilio.chat.ChatClient.Properties.getCommandTimeout ( )
Returns
Timeout in milliseconds 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.

String com.twilio.chat.ChatClient.Properties.getRegion ( )

Twilio server region to connect to.

Instances exist in specific regions, so this should only be changed if needed.

Returns
Region such as us1 or ie1.
boolean com.twilio.chat.ChatClient.Properties.isUseProxy ( )

If useProxy flag is true ChatClient 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 ChatClient will use direct connection.

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

The default value is false.

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

Example of the proxysettings.properties file

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

Member Data Documentation

final int com.twilio.chat.ChatClient.Properties.DEFAULT_COMMAND_TIMEOUT = 90000
static

Default command timeout value that could be passed into Builder#setCommandTimeout.

final int com.twilio.chat.ChatClient.Properties.MIN_COMMAND_TIMEOUT = 10000
static

Minimum valid command timeout value that could be passed into Builder#setCommandTimeout.