ChatBuilder
Definition of builder used to create Chat instance.
All options in the builder are now optional, but it is recommended to set either authorization (to the non-default value) or username.
Types
Functions
Build an instance of chat asynchronously. Previously this method guaranteed an instance to be returned via callback, this is no longer the case. If there is an communication issue with the server, this method will throw a runtime exception.
Builds an instance of chat asynchronously. Any standard issue which may happen during will be reported as IllegalStateException in Result.onFailure. All failures are logged if setDevelopmentMode is set.
Sets authorization for newly created instance of the chat. It's used in the case where Authorization is enabled in the backend configuration.
Sets optional ChatStateListener which will be notified about changes to availability of chat functionality. It is highly recommended to supply this listener.
Sets a development mode. This can have various effects throughout the SDK such as verbose logging.
Sets optional device token of for purpose of receiving push messages.
Sets a default username. If the username changes invoke this method again and build the new chat to apply the changes. Usually, this should be done with app's lifecycle events automatically. Name is updated with every eligible event, likely will be updated during the authorization step when running build.