Typing Status
#
Send typing statusYou can able to send the typing/gone status to the users, so that they can aware of whether user is typing the message or not. if you want send the typing status for a user, you can utilise the below method.
Argument | Type | Description |
---|---|---|
TO_JID | String | jid of the chat user |
CHAT_TYPE | ChatTypeEnum | chat type |
While user starts typing the message in the input box of the chat window, call the below method to send the composing status, so that they can show a typing message in the header/recent chat.
- Java
- Kotlin
Once user stopped/finished typing the message in the input box of the chat window, call the below method to send the gone status, so that they can hide a typing message in the header/recent chat.
- Java
- Kotlin
#
Observe the typing statusTo observe the typing status changes, you can use the below method to setup listener for the typing events.
Argument | Type |
---|---|
LISTENER | TypingStatusListener |
- Java
- Kotlin
Once the listener has been set by the sdk user, the below callbacks will be triggered based on the chat type.
#
Single chatfor single chat below callback will be triggered
#
Callback argumentsArgument | Type | Description |
---|---|---|
fromUserJid | String | jid of the typing user |
status | TypingStatus | The status param will be either composing or gone |
note
composing
means user is typing the message.
gone
means user stopped the typing
- Java
- Kotlin
#
Group chatfor group chat below callback will be triggered
#
Callback argumentsArgument | Type | Description |
---|---|---|
groupJid | String | jid of the group in which user is typing the message |
groupUserJid | String | jid of the typing user |
status | TypingStatus | The status param will be either composing or gone |
note
composing
means user is typing the message.
gone
means user stopped the typing
- Java
- Kotlin