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.
AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Key Classes | TypingIndicator |
| Key Methods | CometChat.startTyping(), CometChat.endTyping() |
| Receiver Types | CometChatReceiverType.user, CometChatReceiverType.group |
| Listener Events | onTypingStarted, onTypingEnded |
| Prerequisites | SDK initialized, user logged in |
Send a Typing Indicator
In other words, as a sender, how do I let the recipient(s) know that I’m typing?Start Typing
UsestartTyping() to notify the receiver that the logged-in user has started typing. The receiver will receive this information in the onTypingStarted() method of the MessageListener class.
- Start Typing (User)
- Start Typing (Group)
startTyping() Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
receiverUid | String | The UID of the user or GUID of the group to send the typing indicator to | Yes |
receiverType | String | The type of the receiver — CometChatReceiverType.user or CometChatReceiverType.group | Yes |
startTyping() returns void — the typing indicator is sent as a fire-and-forget operation.
Stop Typing
UseendTyping() to notify the receiver that the logged-in user has stopped typing. The receiver will receive this information in the onTypingEnded() method of the MessageListener class.
- Stop Typing (User)
- Stop Typing (Group)
endTyping() Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
receiverUid | String | The UID of the user or GUID of the group to send the typing indicator to | Yes |
receiverType | String | The type of the receiver — CometChatReceiverType.user or CometChatReceiverType.group | Yes |
endTyping() returns void — the typing indicator is sent as a fire-and-forget operation.
Use the
metadata field of the TypingIndicator class to pass additional custom data along with the typing indicators. The metadata field is a Map<String, String> and can be set using the .metadata property. This data will be received at the receiver end and can be obtained using the same property.Real-time Typing Indicators
In other words, as a recipient, how do I know when someone is typing? UseonTypingStarted and onTypingEnded in MessageListener to receive TypingIndicator events.
- Dart
TypingIndicator with the following fields:
| Parameter | Type | Description |
|---|---|---|
sender | User | An object of the User class holding all the information related to the sender of the typing indicator. |
receiverId | String | UID of the receiver. This is the ID of the group or the user the typing indicator is being sent to. |
receiverType | String | Indicates if the typing indicator is to a user or a group — CometChatReceiverType.user or CometChatReceiverType.group. |
metadata | Map<String, String>? | Optional metadata to provide additional data. |
lastTimestamp | DateTime | The timestamp of the last typing indicator event. |
Next Steps
Delivery & Read Receipts
Track message delivery and read status
Transient Messages
Send ephemeral real-time messages like live reactions