Documentation Index Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Send a Typing Indicator
Start Typing
Use startTyping() with a TypingIndicator object to notify the receiver that you’re typing.
Start Typing User (TypeScript)
Start Typing User (JavaScript)
Start Typing Group (TypeScript)
Start Typing Group (JavaScript)
let receiverId : string = "UID" ;
let receiverType : string = CometChat . RECEIVER_TYPE . USER ;
let typingNotification : CometChat . TypingIndicator = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . startTyping ( typingNotification );
let receiverId = "UID" ;
let receiverType = CometChat . RECEIVER_TYPE . USER ;
let typingNotification = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . startTyping ( typingNotification );
let receiverId : string = "GUID" ;
let receiverType : string = CometChat . RECEIVER_TYPE . GROUP ;
let typingNotification : CometChat . TypingIndicator = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . startTyping ( typingNotification );
let receiverId = "GUID" ;
let receiverType = CometChat . RECEIVER_TYPE . GROUP ;
let typingNotification = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . startTyping ( typingNotification );
startTyping() returns void — the typing indicator is sent as a fire-and-forget operation.
Stop Typing
Use endTyping() to notify the receiver that you’ve stopped typing.
Stop Typing User (TypeScript)
Stop Typing User (JavaScript)
Stop Typing Group (TypeScript)
Stop Typing Group (JavaScript)
let receiverId : string = "UID" ;
let receiverType : string = CometChat . RECEIVER_TYPE . USER ;
let typingNotification : CometChat . TypingIndicator = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . endTyping ( typingNotification );
let receiverId = "UID" ;
let receiverType = CometChat . RECEIVER_TYPE . USER ;
let typingNotification = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . endTyping ( typingNotification );
let receiverId : string = "GUID" ;
let receiverType : string = CometChat . RECEIVER_TYPE . GROUP ;
let typingNotification : CometChat . TypingIndicator = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . endTyping ( typingNotification );
let receiverId = "GUID" ;
let receiverType = CometChat . RECEIVER_TYPE . GROUP ;
let typingNotification = new CometChat . TypingIndicator ( receiverId , receiverType );
CometChat . endTyping ( typingNotification );
endTyping() returns void — the typing indicator is sent as a fire-and-forget operation.
Use setMetadata() on
TypingIndicator to pass
additional custom data. Retrieve it with getMetadata() on the receiver side.
Real-time Typing Indicators
Use onTypingStarted and onTypingEnded in MessageListener to receive typing events.
let listenerId : string = "UNIQUE_LISTENER_ID" ;
CometChat . addMessageListener (
listenerId ,
new CometChat . MessageListener ({
onTypingStarted : ( typingIndicator : CometChat . TypingIndicator ) => {
console . log ( "Typing started :" , typingIndicator );
},
onTypingEnded : ( typingIndicator : CometChat . TypingIndicator ) => {
console . log ( "Typing ended :" , typingIndicator );
}
})
);
let listenerId = "UNIQUE_LISTENER_ID" ;
CometChat . addMessageListener (
listenerId ,
new CometChat . MessageListener ({
onTypingStarted : typingIndicator => {
console . log ( "Typing started :" , typingIndicator );
},
onTypingEnded : typingIndicator => {
console . log ( "Typing ended :" , typingIndicator );
}
})
);
The received object is a TypingIndicator .
Always remove message listeners when they’re no longer needed (e.g., on component unmount or page navigation). Failing to remove listeners can cause memory leaks and duplicate event handling. CometChat . removeMessageListener ( "UNIQUE_LISTENER_ID" );
Next Steps
Delivery & Read Receipts Track when messages are delivered and read
Transient Messages Send ephemeral real-time messages like live reactions