Link Search Menu Expand Document

Messages Injection Work in progress

Table of contents


The hosting app has the ability to control and engage with the messages that are being inserted to the chat.
Messages of vary types can be injected into the chat, while some may be configured to be injected by the SDK.

Injecting chat messages

The SDK exposes an API to enable injection of messages into the chat by the hosting app.
Messages can be injected to the chat, once the chat was Accepted.

override fun onChatStateChanged(stateEvent: StateEvent) {
    when (stateEvent.state) {
        StateEvent.Accepted -> {
            // now you can start injecting messages to the chat 

How to inject messages:

Use ChatController::post method.


// inject message from user side:"hello"));

// inject message from agent side:"Hi"));

// inject system message:"This is an automatic message"));