please select
Call
  • Web
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration (React)
      • Integration (Vue3)
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Configuring Nickname and Avatar
      • GroupCall
      • Floating Window
      • Custom Ringtone
      • Configure Resolution and Fill Mode
      • Monitoring Call Status
      • Language Settings
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
      • Engine APIs
        • TUICallEngine
        • TUICallEvent
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FAQs
      • All Platfroms
      • Web
      • ErrorCode
      • Release Notes
  • Android
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Offline Call Push
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
        • TUICallObserver
        • Type Definition
      • Engine APIs
        • TUICallEngine
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FAQs
      • All Platforms
      • Android
      • ErrorCode
      • Release Notes
  • iOS
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Offline Call Push
        • VoIP
        • APNs
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
        • TUICallObserver
        • Type Definition
      • Engine APIs
        • TUICallEngine
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FQAs
      • All Platform
      • iOS
      • ErrorCode
      • Release Notes
  • Flutter
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • offline Call Push
        • Notification
        • VoIP (Optional)
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
      • Beauty Effects
    • Client APIs
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FQAs
      • All Platform
      • Flutter
      • ErrorCode
      • Upgrading
      • Release Notes
Call

UI Customization

This document describes how to customize the UI of TUICallKit and provides two schemes for customization: slight UI adjustment and custom UI implementation.

Scheme 1. Slight UI Adjustment

You can adjust the UI of TUICallKit by directly modifying the UI source code in the Android/tuicallkit-kt folder in tencentyun/TUICallKit.

Replacing icons

You can directly replace the icons in the tuicallkit-kt/src/main/res/drawable-xxhdpi folder to customize the color tone and style of all the icons in your application. When you replace an icon, make sure the filename is the same as the original icon.




Replacing ringtones

You can replace ringtones by replacing the three audio files in the tuicallkit-kt/src/main/res/raw folder.
Filename
Description
phone_dialing.mp3
The sound of making a call
phone_hangup.mp3
The sound of being hung up
phone_ringing.mp3
The ringtone for incoming calls

Replacing text

You can modify the strings on the video call UI by modifying the strings.xml file in tuicallkit-kt/src/main/res/values-**/.

Scheme 2. Custom UI Implementation

The entire call feature of TUICallKit is implemented based on the UI-less component TUICallEngine. You can delete the tuicallkit folder and implement your own UIs based entirely on TUICallEngine.

TUICallEngine

TUICallEngine is the underlying API of the entire TUICallKit component. It provides key APIs such as APIs for making, answering, declining, and hanging up one-to-one audio/video and group calls and device operations.
API
Description
Creates a TUICallEngine instance (singleton).
Terminates a TUICallEngine instance (singleton).
init
Completes the authentication of basic audio/video call capabilities.
Registers an event listener.
Unregisters an event listener.
call
Makes a one-to-one call.
groupCall
Makes a group call.
accept
Answers a call.
reject
Declines a call.
hangup
Hangs up a call.
ignore
Ignores a call.
Invites a user during a group call.
Joins the current group call actively.
Switches the call media type, such as from video call to audio call.
Subscribes to the video stream of a remote user.
Unsubscribes from the video stream of a remote user.
Enables the camera.
Disables the camera.
Switches between the front and rear cameras.
Enables the mic.
Disables the mic.
Selects the audio playback device (receiver/speaker on the device).
Sets the user nickname and profile photo.
Enables/Disables the multi-device login mode of TUICallEngine (supported by the premium plan).
Set the rendering mode of video image.
Set the encoding parameters of video encoder.
Advanced features.
Set beauty level, support turning off default beauty.

TUICallObserver

TUICallObserver is the callback even class of TUICallEngine. You can use it to listen on the desired callback events.
API
Description
onError
An error occurred during the call.
A call was received.
The call was canceled.
The call was connected.
onCallEnd
The call ended.
The call media type changed.
A user declined the call.
A user didn't respond.
A user was busy.
A user joined the call.
A user left the call.
Whether a user had a video stream.
Whether a user had an audio stream.
The volume levels of all users.
The network quality of all users.

Definitions of Key Types

API
Description
The call media type. Enumeration: Video call and audio call.
The call role. Enumeration: Caller and callee.
The call status. Enumeration: Idle, waiting, and answering.
The audio/video room ID, which can be a number or string.
The camera type. Enumeration: Front camera and rear camera.
The audio playback device type. Enumeration: Speaker and receiver.
The information of the current network quality.