Skip to main content

Overview

The Incoming call is a Component that serves as a visual representation when the user receives an incoming call, such as a voice call or video call, providing options to answer or decline the call.
The Incoming Call is comprised of the following base components:

Usage

Integration

Actions

Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.

1. onAccept

onAccept is triggered when you click the accept button of the Incoming Call component. You can override this action using the following code snippet.

2. onDecline

onDecline is triggered when you click the Decline button of the Incoming Call component. You can override this action using the following code snippet.

3. onError

This action doesn’t change the behavior of the component but rather listens for any errors that occur in the Incoming Call component.

Filters

You can set CallSettingsBuilder in the Incoming Call Component to customise the calling experience. To know more about the filters available please refer to CallSettingsBuilder.

Events

Events are emitted by a Component. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed. The list of events emitted by the Incoming Call component is as follows.


Customization

To fit your app’s design requirements, you can customize the appearance of the Incoming Call component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.

Style

Using CSS you can customize the look and feel of the component in your app like the color, size, shape, and fonts. Example:

Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements. Here is a code snippet demonstrating how you can customize the functionality of the Incoming Call component.
Below is a list of customizations along with corresponding code snippets

Advanced

For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your views, layouts, and UI elements and then incorporate those into the component.

SubtitleView

Property subtitleView is a function that renders a JSX element to display the subtitle view.

LeadingView

Property leadingView is a function that renders a JSX element to display the leading view. The customized call interface is displayed below.
Use the following code to achieve the customization shown above.

TitleView

Property titleView is a function that renders a JSX element to display the title view. The customized call interface is displayed below.
Use the following code to achieve the customization shown above.

TrailingView

Property trailingView is a function that renders a JSX element to display the trailing view. The customized call interface is displayed below.
Use the following code to achieve the customization shown above.

ItemView

Property itemView is a function that renders a JSX element to display the item view. The customized call interface is displayed below.
Use the following code to achieve the customization shown above.