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
Send a Typing Indicator
Start Typing
UsestartTyping() with a TypingIndicator object to notify the receiver that you’re typing.
- Java (User)
- Kotlin (User)
- Java (Group)
- Kotlin (Group)
Stop Typing
UseendTyping() to notify the receiver that you’ve stopped typing.
- Java (User)
- Kotlin (User)
- Java (Group)
- Kotlin (Group)
Use
setMetadata() on TypingIndicator to pass additional custom data. Retrieve it with getMetadata() on the receiver side.Real-time Typing Indicators
UseonTypingStarted and onTypingEnded in MessageListener to receive typing events.
- Java
- Kotlin
TypingIndicator class consists of the below parameters:
| Parameter | Information |
|---|---|
sender | An object of the User class holding all the information related to the sender of the typing indicator. |
receiverId | UID of the receiver. This is the ID of the group or the user the typing indicator is being sent to. |
receiverType | This parameter indicates if the typing indicator is to be sent to a user or a group. The possible values are: 1. CometChatConstants.RECEIVER_TYPE_USER 2. CometChatConstants.RECEIVER_TYPE_GROUP |
metadata | A JSONObject to provider additional data |
TypingIndicator Payload Structure
TypingIndicator Object
TypingIndicator Object
The
Sample TypingIndicator Object:
TypingIndicator object contains information about typing status:| Parameter | Type | Description |
|---|---|---|
sender | User | User who is typing |
receiverId | String | ID of the receiver (user UID or group GUID) |
receiverType | String | Type of receiver. Values: "user", "group" |
metadata | JSONObject | Custom typing metadata |
lastTimestamp | long | Unix timestamp of last typing event |
typingStatus | String | Typing status. Values: "started", "ended" |
User Object (Typing)
User Object (Typing)
The nested
User object in sender contains:| Parameter | Type | Description |
|---|---|---|
uid | String | Unique identifier of the user |
name | String | Display name of the user |
avatar | String | URL to user’s profile picture |
link | String | URL to user’s profile page |
role | String | User role for access control |
metadata | JSONObject | Custom data set by developer |
status | String | User online status. Values: "online", "offline" |
statusMessage | String | Custom status message |
lastActiveAt | long | Unix timestamp of last activity |
hasBlockedMe | boolean | Whether this user has blocked the logged-in user |
blockedByMe | boolean | Whether the logged-in user has blocked this user |
tags | Array<String> | List of tags for user identification |
deactivatedAt | long | Unix timestamp when user was deactivated (0 if active) |
Next Steps
Delivery & Read Receipts
Track message delivery and read status
Receive Messages
Handle incoming messages with listeners
Retrieve Conversations
Fetch conversation list
Real-Time Listeners
Learn more about event listeners