build

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.

If the instance is not retrieved within a reasonable amount of time, the device is not connected to the internet, or the chat provider experiences outage or your instance is misconfigured. In all of these cases, consult a representative.

Can be called from any thread, but will change to non-main thread immediately.

Return

A Cancellable which allows to cancel the asynchronous operation.

See also


Deprecated

Please migrate to build method with OnChatBuildResultCallback

Replace with

import com.nice.cxonechat.ChatBuilder.OnChatBuiltResultCallback
build(resultCallback = OnChatBuiltResultCallback { callback.onChatBuilt(it.getOrThrow()) })

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.