Skip to main content

Typing status

Typing status displays a "typing" indicator when the other party is entering a message. The default ChatUI channel page includes built-in logic for sending and displaying typing status.

Typing status indicator

Limitations

  • Supports direct channels (ChannelType.DIRECT) only.
  • Typing status is a high-frequency event. Display it only when necessary.

Custom page integration

If you use a custom channel page, use the following nexconn APIs:

  • Send typing status: DirectChannel.sendTypingStatus(...)
  • Receive typing status: NCEngine.addChannelHandler(...).onTypingStatusChanged(...)
kotlin
val direct = NCChatUI.createChannel(
ChannelIdentifier(ChannelType.DIRECT, "user_001")
) as DirectChannel

// Send "typing text" status
direct.sendTypingStatus(MessageType.TEXT)
kotlin
private const val TYPING_HANDLER_ID = "typing_status_listener"

NCEngine.addChannelHandler(
TYPING_HANDLER_ID,
object : ChannelHandler {
override fun onTypingStatusChanged(event: TypingStatusChangedEvent) {
val id = event.channelIdentifier
val typingUsers = event.userTypingStatus
// Filter by current channel and update title bar with "typing" indicator
}
}
)

NCEngine.removeChannelHandler(TYPING_HANDLER_ID)