Agent Typing Indication Work in progress
Table of contents
Overview
Appears when the live agent is typing.
The typing indication can be displayed as text and/or drawable.
Typing drawable can be an AnimatedVector.
How to enable
By default typing indication is enabled
.
The component display can be disabled through ConversationSettings
.
val settings = ConversationSettings()...
.disableTypingIndication()
ChatController.Builder(context).apply {
conversationSettings(settings)
...
}
Listening to typing notifications
In order to receive typing state changes, subscribe to `OperatorEvent.OperatorTyping’ notifications, with the chatController.
// 1. implement Notifiable interface
// 2. pass the implementation and the list of notifications that you want to receive.
chatController.subscribeNotifications(NotifiableImpl, OperatorEvent.OperatorTyping,...)
Follow for more info about notifications subscription
How to customize
Typing indication UI component is provided by the SDK, and can be customize either by configuration setting or by view implementation overriding.
Customizing by Configure
Override `ChatUIProvider.typingUIProvider.configure` method:
```kotlin
ChatUIProvider(context).apply {
typingUIProvider.configure = { adapter:TypingUIAdapter ->
...
}
}
```
Customizing by override
Override overrideFactory value with your own TypingFactory
implementation: ```kotlin ChatUIProvider(context).apply { typingUIProvider.overrideFactory = MyTypingFactory() }
// for e.g.
class MyTypingFactory : TypingFactory{
// TypingUIAdapter interface should be
// implemented by the overriding component
return object : TypingUIAdapter{
...
}
}
```