Skip to main content
Build a detailed Call Log Details screen in your Android app using CometChat’s UI Kit and Calls SDK, displaying metadata, participants, join/leave history, and recordings for full transparency and auditing.

Overview

When a user taps a call entry, the Call Details screen shows:
  • Metadata: Call type, duration, timestamp, and status.
  • Participants: List of users who joined the call.
  • History: Chronological join/leave events.
  • Recordings: Playback links for any recorded calls.
This feature is essential for support, moderation, and post-call reviews.

Prerequisites

  • Android Studio project targeting API 24+.
  • CometChat Android UI Kit v5 (com.cometchat:chatuikit-kotlin or com.cometchat:chatuikit-jetpack) and CometChat Calls SDK added in build.gradle.
  • A logged-in CometChat user (CometChat.getLoggedInUser() non-null).
  • Required permissions in AndroidManifest.xml: Internet, Camera, Microphone.
  • ViewBinding enabled or equivalent view setup.

Components

Integration Steps

1. Show Call Logs Using CometChatCallLogs

Use the UI Kit’s CometChatCallLogs component to display recent calls.
fragment_calls.xml
Handle call log item clicks to navigate to the details screen:
CallsFragment.kt

2. Load CallsFragment in HomeActivity

Display the Calls tab via bottom navigation.
HomeActivity.kt

3. Configure CallDetailsActivity

Initialize the detail screen with tabs for metadata, participants, history, and recordings.
CallDetailsActivity.kt

4. Implement CometChatCallLogDetails Component

Use the UI Kit widget for an all-in-one detail view.

Implementation Flow

  1. CallsFragment fetches and displays call logs list.
  2. User taps a call → navigates to CallDetailsActivity / CallDetailsScreen with call data.
  3. Detail screen initializes ViewModel, ViewPager2/TabRow, and TabLayout.
  4. Tab fragments/composables render participants, join/leave history, and recordings.
  5. CometChatCallLogDetails can be used as a single-widget alternative.

Customization Options

  • Style tabs and headers via CometChatTheme or custom attributes.
  • Override individual fragments/composables for additional data (e.g., call notes).
  • Control visibility of tabs based on call type or recording availability.

Filtering & Edge Cases

  • Missed Calls: Use CallsRequestBuilder().setTypes(CallType.MISSED) to filter.
  • No Recordings: Hide or disable the Recordings tab.
  • Blocked Users: Disable profile links in Participants tab.

Error Handling

  • Observe StateFlow<Throwable> in CallDetailsViewModel to show retry UIs.
  • Use detailsView.setOnError() and setOnEmpty() for fallback views in UI Kit widget.

Summary / Feature Matrix

Android Sample App (Kotlin)

Explore this feature in the CometChat SampleApp: GitHub → SampleApp