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 | TransientMessage |
| Key Methods | CometChat.sendTransientMessage() |
| Receiver Types | CometChatReceiverType.user, CometChatReceiverType.group |
| Listener Events | onTransientMessageReceived |
| Prerequisites | SDK initialized, user logged in |
Available via: SDK | UI Kits
Send a Transient Message
You can use thesendTransientMessage() method to send a transient message to a user or in a group. The receiver will receive this information in the onTransientMessageReceived() method of the MessageListener class. In order to send the transient message, you need to use the TransientMessage class.
- User
- Group
TransientMessage Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
receiverId | String | The UID of the user or GUID of the group to send the transient message to | Yes |
receiverType | String | The type of the receiver — CometChatReceiverType.user or CometChatReceiverType.group | Yes |
data | Map<String, dynamic> | A map to provide custom data with the transient message | Yes |
sender | User? | The sender of the transient message (set automatically by the SDK) | No |
Error
Error
| Parameter | Type | Description | Sample Value |
|---|---|---|---|
code | String | Error code identifier | "ERR_CHAT_API_FAILURE" |
message | String | Human-readable error message | "Failed to send the transient message." |
details | String | Additional technical details | "An unexpected error occurred while sending the transient message." |
Real-time Transient Messages
In other words, as a recipient, how do I know when someone sends a transient message? You will receive the transient message in theonTransientMessageReceived() method of the registered MessageListener class.
- Dart
TransientMessage 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 transient message. |
receiverId | String | Unique ID of the receiver. This can be the UID of the user or GUID of the group the transient message is sent to. |
receiverType | String | The type of the receiver — CometChatReceiverType.user or CometChatReceiverType.group. |
data | Map<String, dynamic> | A map containing the custom data sent with the transient message. |
Next Steps
Send Messages
Learn how to send persistent text and media messages
Typing Indicators
Show real-time typing status to users