Chat Loaded Listener
Callback invoked when ChatController.Builder.build has finished loading the chat session.
The callback receives a ChatLoadResponse containing either the chat androidx.fragment.app.Fragment ready to be presented, or an com.genesys.cloud.core.utils.NRError describing why the chat could not be loaded.
Usage:
val controller = ChatController.Builder(this)
.chatEventListener(this)
.build(account, object : ChatLoadedListener {
override fun onComplete(result: ChatLoadResponse) {
result.error?.let { showError(it) }
?: result.fragment?.let { showChatFragment(it) }
}
})Content copied to clipboard