Skip to main content
Quick Reference for AI Agents & Developers
// Key listener types
CometChat.addMessageListener(id, listener);      // Messages, typing, receipts
CometChat.addUserListener(id, listener);         // User presence
CometChat.addGroupListener(id, listener);        // Group events
CometChat.addCallListener(id, listener);         // Call events
CometChat.addConnectionListener(id, listener);   // WebSocket status
CometChat.addLoginListener(id, listener);        // Auth state

// Message categories
CometChat.CATEGORY_MESSAGE      // text, image, video, audio, file
CometChat.CATEGORY_CUSTOM       // custom types
CometChat.CATEGORY_ACTION       // system events
CometChat.CATEGORY_CALL         // call messages
CometChat.CATEGORY_INTERACTIVE  // forms, cards
Access comprehensive resources to help you build, debug, and optimize your CometChat integration.

Quick Reference

Migration & Upgrades

Upgrading from V3

Step-by-step guide to migrate from SDK v3 to v4

Event Listeners Reference

The SDK provides real-time listeners for all chat events:
Listener TypePurposeKey Events
Message ListenerIncoming messagesonTextMessageReceived, onMediaMessageReceived
User ListenerUser status changesonUserOnline, onUserOffline
Group ListenerGroup updatesonGroupMemberJoined, onGroupMemberLeft
Call ListenerCall eventsonIncomingCallReceived, onOutgoingCallAccepted
Connection ListenerWebSocket statusonConnected, onDisconnected
Login ListenerAuth stateonLoginSuccess, onLogout

External Resources

Getting Help

Start with the SDK Overview for a complete guide to all features.
Explore our sample applications on GitHub for working implementations.
Contact CometChat Support for technical assistance.

Next Steps