Skip to content

docs(android): correct the ringing pages against the SDK source (for #561) - #569

Merged
hritika-cometchat merged 1 commit into
feature/android-ringing-push-sdkfrom
fix/android-ringing-docs-source-check
Oct 20, 2026
Merged

hritika-cometchat merged 1 commit into
feature/android-ringing-push-sdkfrom
fix/android-ringing-docs-source-check

Conversation

@jitvarpatil

Copy link
Copy Markdown
Contributor

Fixes for #561, found by checking every page against the SDK source. This PR targets feature/android-ringing-push-sdk, so merging it updates #561.

Sources checked against:

  • Calls SDK: calls-core prepare-session-flow (5.1.0-beta.2)
  • Push SDK: push-notifications-sdk-android release/2.0 (2.0.0-beta.3)
  • UI Kit: uikit-android ENG-39907-ringing-v2-incoming

Fixes that change integration steps

  • The UI Kit doesn't bring the Push SDK. chatuikit-core declares api dependencies on the Chat and Calls SDKs only; no library module depends on push. Getting Started (3 pages), Call Features and Calling Integration now say so, and Calling Integration's Gradle snippets add both push artifacts. The UI Kit is listed first, so its ring colours win.
  • UI Kit minSdk is 28, not 26 (chatuikit-core/build.gradle.kts:25).
  • Permissions merge in. RECORD_AUDIO, CAMERA and POST_NOTIFICATIONS are already declared by the Calls SDK, the UI Kit and the calls module. The pages now say "request at runtime" instead of "declare".
  • Push init on every app start, before login. Login/logout token registration (TokenAutoRegistrar.start()) only runs in a process where init ran; the restore path for a killed app doesn't start it.
  • setProviderId is required. Without it, registration fails with PROVIDER_REQUIRED.
  • setNotificationSmallIcon covers chat notifications only, and defaults to ic_dialog_email.
  • Logout wording. A Chat logout unregisters the token; only a Calls logout stops a ring.
  • getActiveSession() is @Nullable. The Kotlin samples now use ?.. They didn't compile before.

Behaviour corrections

  • Prepared session expiry. A prepared session that expires after 5 minutes reports onConnectionClosed, not onSessionTimedOut (session.ts onPrepareTimeout).
  • Callee end reasons now include ended.
  • joinSession settings. On a prepared session they are ignored; the callee's settings come from the Push SDK.
  • Caller ring timer. The caller has none, so the docs now recommend one: a ring the callee never received runs for 5 minutes.
  • Group calls. initiateCall accepts RECEIVER_TYPE_GROUP, and a group decline or busy stays local.
  • A second init() with a different app ID re-initialises the SDK.
  • CometChatCallsConstants has been deprecated since 5.0, not 5.1.

Code samples

  • setShowWhenLocked / setTurnScreenOn are now guarded for API 27, because the calls module's minSdk is 26.
  • Second-call onNewIntent. With the activity declared singleTop, the relaunch went back to the same instance. The fix matches CometChatOngoingCallActivity: no singleTop in the manifest (the answer intent already carries SINGLE_TOP), and the relaunch uses setFlags(FLAG_ACTIVITY_NEW_TASK) only.
  • Custom ring screen now has its manifest entry.
  • Compose CometChatIncomingCall: onAcceptClick runs after the default accept. The page now answers through onAcceptRequested instead.
  • setOnError / onError take one parameter.

UI Kit event scope

  • CallRejected fires only for End or the 45 s timer.
  • CallEnded fires only when this device hangs up a call opened with a Call.
  • CometChatCallActivity can't be the Push SDK's incoming-call activity: it never reads CallBundles.
  • initiateUserCall fails with CALL_IN_PROGRESS; ACTIVE_CALL comes from Call Buttons.

Checks

  • Navigation and links still resolve (0 dangling navigation refs, 0 broken links), and the new anchors exist.
  • Code fences and <Tabs> are balanced on every page.
  • I didn't run mint dev.

Not changed

  • The dashboard "ringing migration" setting still needs its real name; the TODO(RC) stays.
  • The Push SDK's own docs/integration.md has the same "init once per install" error. That belongs in the SDK repo.

🤖 Generated with Claude Code

Checked every page in this PR against calls-core prepare-session-flow
(Calls SDK 5.1.0-beta.2), push-notifications-sdk-android release/2.0
(2.0.0-beta.3) and uikit-android ENG-39907-ringing-v2-incoming.

Dependencies and setup
- The UI Kit brings the Calls SDK only; no library module depends on the
  Push SDK. Getting Started (3 pages), Call Features and Calling
  Integration now say so, and Calling Integration's Gradle snippets add
  both push artifacts (UI Kit listed first, so its ring colours win).
- UI Kit minSdk is 28, not 26.
- Permissions: RECORD_AUDIO, CAMERA and POST_NOTIFICATIONS already merge
  in from the Calls SDK, the UI Kit and the calls module; pages now say
  "request at runtime" instead of "declare".
- Push init runs in Application.onCreate on every start, before login:
  login/logout token registration only runs in a process where init ran.
- setProviderId is required; setNotificationSmallIcon covers chat
  notifications only and defaults to a system icon.
- Logout: a Chat logout unregisters the token; only a Calls logout stops
  a ring.

Calls SDK
- getActiveSession() is @nullable: Kotlin samples use ?. and the page
  explains registering after join or through CallSession.getInstance().
- A prepared session that expires (5 min) reports onConnectionClosed, not
  onSessionTimedOut; samples and tables updated.
- Callee end reasons include `ended`; treat unknown reasons as "over".
- joinSession ignores settings on a prepared session (callee settings are
  the Push SDK's).
- The caller has no ring timer: recommend one, since nothing else ends a
  ring the callee never received for 5 minutes.
- initiateCall accepts RECEIVER_TYPE_GROUP; group decline/busy is local.
- A second init() with a different app ID re-initialises.
- CometChatCallsConstants has been deprecated since 5.0.

Push ringing samples
- setShowWhenLocked/setTurnScreenOn guarded for API 27 (calls module
  minSdk is 26).
- The answer activity is no longer singleTop in the manifest, and
  onNewIntent relaunches with FLAG_ACTIVITY_NEW_TASK only, as the UI
  Kit's CometChatOngoingCallActivity does; singleTop routed the relaunch
  back to the same instance.
- Custom ring screen gets its manifest entry.

UI Kit events
- CometChatCallEvent.CallRejected fires only for End or the 45 s timer;
  CallEnded only when this device hangs up a call opened with a Call.
- Compose CometChatIncomingCall: onAcceptClick runs after the default
  accept; use onAcceptRequested to answer through the Push SDK.
- setOnError / onError take one parameter.
- CometChatCallActivity cannot be the Push SDK's incoming-call activity.
- initiateUserCall fails with CALL_IN_PROGRESS; ACTIVE_CALL is Call
  Buttons'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hritika-cometchat
hritika-cometchat merged commit 2fcdc6a into feature/android-ringing-push-sdk Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants