AI Integration Quick Reference
AI Integration Quick Reference
Prerequisites
Get your credentials from the CometChat Dashboard:
- App ID
- Region
- Auth Key (for development)
Migrating from v3 to v4? Your existing v3 app can be migrated directly — no need to create a new app. Follow the installation steps below to upgrade to the latest version of v4.
Installation
async-storage as a peer dependency:
Voice & Video Calling (Optional)
v2.4+ onwards, calling functionality lives in a separate package. Install it only if you need voice/video:- Android
- iOS
Add permissions to your Add the CometChat Maven repository to your project-level Ensure
AndroidManifest.xml:build.gradle:minSdkVersion is set to 24 in the buildscript ext block:Initialization
Theinit() method initializes the SDK and must be called before any other CometChat method. Call it once at app startup, typically in App.tsx.
- TypeScript
- JavaScript
APP_ID and APP_REGION with your credentials from the Dashboard.
Parameters
AppSettings Options
Presence Subscription
Choose how to subscribe to user presence (online/offline status):WebSocket Connection
By default, the SDK manages WebSocket connections automatically. To manage them manually:Next Steps
Authentication
Log in users with Auth Key or Auth Token
Send Messages
Send your first message