Skip to main content

Installation & Setup

SymptomCauseFix
Gradle sync failsRepository not added or version mismatchEnsure maven { url 'https://dl.cloudsmith.io/public/cometchat/cometchat/maven/' } is in your build.gradle
init() fails silentlyInvalid App ID or RegionDouble-check credentials from the CometChat Dashboard
Duplicate class errorsConflicting WebRTC or transitive dependenciesExclude conflicting modules in your build.gradle dependencies block
minSdkVersion errorSDK requires higher minimum API levelSet minSdkVersion to 21 or higher

Authentication

SymptomCauseFix
login() fails with invalid UIDUID doesn’t exist in CometChatCreate the user via Dashboard or REST API first
Auth token expiredToken has a limited lifetimeGenerate a new auth token and call login() again
login() called before init()SDK not initializedAlways call init() and wait for the callback before calling login()

Joining a Session

SymptomCauseFix
generateToken() failsUser not logged in or invalid session IDEnsure login() completes before generating a token
Session joins but no audio/videoRuntime permissions not grantedRequest CAMERA and RECORD_AUDIO permissions at runtime before joining
joinSession() throws errorInvalid or expired tokenGenerate a fresh token using generateToken() before joining

Audio & Video

SymptomCauseFix
No audio from remote participantsAudio routing issueCheck Audio Modes for speaker/earpiece configuration
Camera not workingPermission denied or hardware issueVerify CAMERA permission is granted and camera is not in use by another app
Echo or feedbackSpeaker mode with no echo cancellationUse earpiece mode or headphones

Background & VoIP

SymptomCauseFix
Call drops when app goes to backgroundNo foreground serviceImplement a foreground service to keep the call alive. See Background Handling
VoIP notifications not workingFCM not configuredSet up Firebase Cloud Messaging. See VoIP Calling
App killed by OS during callMissing foreground service notificationShow a persistent notification during active calls

Picture-in-Picture

SymptomCauseFix
PiP not workingMissing manifest attributeAdd android:supportsPictureInPicture="true" to your activity in AndroidManifest.xml
PiP not available on deviceAndroid version below 8.0PiP requires Android 8.0 (API 26) or higher