> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-feature-card-builder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Call Logs

> Call Logs — CometChat documentation.

## Overview

`CometChatCallLogs` is a [Component](/ui-kit/react-native/v4/components-overview#components) that shows the list of Call Log available . By default, names are shown for all listed users, along with their avatar if available.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/E5DbhavBfTmsHVE7/images/92f705bf-call_logs_cometchat_screens-79a3636f9fff7737c4d0f76534efb904.png?fit=max&auto=format&n=E5DbhavBfTmsHVE7&q=85&s=42eb39ae631568206bdd3e4897629711" alt="Image" width="4498" height="3120" data-path="images/92f705bf-call_logs_cometchat_screens-79a3636f9fff7737c4d0f76534efb904.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/wpH0oTjPapnxuXny/images/ce6b81b1-call_logs_cometchat_screens-e9152dc727652add2ab66917172a0fe5.png?fit=max&auto=format&n=wpH0oTjPapnxuXny&q=85&s=31f09661bc16a77f28c3b7f43a8d8700" alt="Image" width="4498" height="3120" data-path="images/ce6b81b1-call_logs_cometchat_screens-e9152dc727652add2ab66917172a0fe5.png" />
  </Tab>
</Tabs>

The `Call Log` is comprised of the following components:

| Components                                             | Description                                                                                                                 |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| [CometChatListItem](/ui-kit/react-native/v4/list-item) | a component that renders data obtained from a Group object on a Tile having a title, subtitle, leading and trailing view    |
| [CometChatDate](/ui-kit/react-native/v4/date)          | This Component used to show the date and time. You can also customize the appearance of this widget by modifying its logic. |
| cometchat-button                                       | This component represents a button with optional icon and text.                                                             |

## Usage

### Integration

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat, CometChatCalls } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

### Actions

[Actions](/ui-kit/react-native/v4/components-overview#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. onItemPress

`onItemPress` is triggered when you click on a ListItem of the Call Logs component. By default it initiate a call to the participant associated with the respective ListItem. You can override this action using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat, CometChatCalls } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const onItemPressHandler = () => {
        //code
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              onItemPress={onItemPressHandler}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 2. onInfoIconPress

`onInfoIconPress` is triggered when you click the Info button Icon of the `Call Logs` component. It does not have a default behavior. However, you can override its behavior using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat, CometChatCalls } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const onInfoIconPressHandler = ({
        call,
      }: {
        call: CometChat.BaseMessage;
      }) => {
        //code
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              onInfoIconPress={onInfoIconPressHandler}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 3. onError

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

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat, CometChatCalls } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const onErrorHandler = (error: CometChat.CometChatException) => {
        //code
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              onError={onErrorHandler}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Filters

**Filters** allow you to customize the data displayed in a list within a `Component`. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using `RequestBuilders` of Chat SDK.

##### 1. CallLogRequestBuilder

The [CallLogRequestBuilder](/sdk/react-native/call-logs) enables you to filter and customize the Call Log based on available parameters in [CallLogRequestBuilder](/sdk/react-native/call-logs). This feature allows you to create more specific and targeted queries when fetching the call logs. The following are the parameters available in [CallLogRequestBuilder](/sdk/react-native/call-logs)

| Methods              | Type       | Description                                                  |
| -------------------- | ---------- | ------------------------------------------------------------ |
| **setLimit**         | number     | Specifies the number of call logs to fetch.                  |
| **setCallType**      | String     | Sets the type of calls to fetch (call or meet).              |
| **setCallStatus**    | callStatus | Sets the status of calls to fetch (initiated, ongoing, etc.) |
| **setHasRecording**  | boolean    | Sets whether to fetch calls that have recordings.            |
| **setCallCategory**  | string     | Sets the category of calls to fetch (call or meet).          |
| **setCallDirection** | string     | Sets the direction of calls to fetch (incoming or outgoing)  |
| **setUid**           | string     | Sets the UID of the user whose call logs to fetch.           |
| **setGuid**          | string     | Sets the GUID of the user whose call logs to fetch.          |
| **setAuthToken**     | string     | Sets the Auth token of the logged-in user.                   |

**Example**

In the example below, we're filtering Call Logs to show only canceled calls and setting the limit to five.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import {
      CometChat,
      CometChatCalls,
      CallLogRequestBuilder,
    } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              callRequestBuilder={new CallLogRequestBuilder()
                .setLimit(5)
                .setCallStatus("cancelled")
                .setAuthToken(loggedInUser.getAuthToken())}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Events

[Events](/ui-kit/react-native/v4/components-overview#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 Call Logs component is as follows.

| Event              | Description                                                                  |
| ------------------ | ---------------------------------------------------------------------------- |
| **ccCallRejected** | This event is triggered when the initiated call is rejected by the receiver. |
| **ccCallFailled**  | This event is triggered when an error occurs during the intiated call.       |
| **ccOutgoingCall** | This event is triggered when the user initiates a voice/video call.          |

<Tabs>
  <Tab title="Adding Listeners">
    ```tsx theme={null}
    import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";

    CometChatUIEventHandler.addCallListener("CALL_LISTENER_ID", {
      ccCallRejected: ({ call }) => {
        //code
      },
    });

    CometChatUIEventHandler.addCallListener("CALL_LISTENER_ID", {
      ccOutgoingCall: ({ call }) => {
        //code
      },
    });

    CometChatUIEventHandler.addCallListener("CALL_LISTENER_ID", {
      ccCallFailled: ({ call }) => {
        //code
      },
    });
    ```
  </Tab>
</Tabs>

***

<Tabs>
  <Tab title="Removing Listeners">
    ```tsx theme={null}
    import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";

    CometChatUIEventHandler.removeCallListener("CALL_LISTENER_ID");
    ```
  </Tab>
</Tabs>

***

## Customization

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

### Style

Using Style you can customize the look and feel of the component in your app, These parameters typically control elements such as the color, size, shape, and fonts used within the component.

##### 1. CallLogs Style

To customize the appearance, you can assign a `CallLogsStyle` object to the `Call Logs` component.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/POKce_Oe2FDpCjGg/images/5d7ccb40-call_logs_style_cometchat_screens-86cedb109a0dc695accf3451511184fc.png?fit=max&auto=format&n=POKce_Oe2FDpCjGg&q=85&s=a89a93b15a4d781161d8cdb7a4ab1133" alt="Image" width="4498" height="3120" data-path="images/5d7ccb40-call_logs_style_cometchat_screens-86cedb109a0dc695accf3451511184fc.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/tKDtB3xjE6jATqmt/images/05b1be48-call_logs_style_cometchat_screens-452b1456f631e3c8b26530d5d1c05456.png?fit=max&auto=format&n=tKDtB3xjE6jATqmt&q=85&s=7a60f98641eb136b879a18fd5d909f20" alt="Image" width="4498" height="3120" data-path="images/05b1be48-call_logs_style_cometchat_screens-452b1456f631e3c8b26530d5d1c05456.png" />
  </Tab>
</Tabs>

In this example, we are employing the `callLogsStyle`.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import {
      CometChat,
      CometChatCalls,
      CallLogRequestBuilder,
    } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogs,
      CallLogsStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const callLogsStyle: CallLogsStyleInterface = {
        titleColor: "#6851D6",
        subtitleTextColor: "#6851D6",
        dateTextColor: "#6851D6",
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              callLogsStyle={callLogsStyle}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

The following properties are exposed by `CallLogsStyle`:

| Property                   | Description                           | Code                                     |
| -------------------------- | ------------------------------------- | ---------------------------------------- |
| **border**                 | Used to set border                    | `border?: BorderStyleInterface,`         |
| **borderRadius**           | Used to set border radius             | `borderRadius?: number;`                 |
| **backgroundColor**        | Used to set background colour         | `background?: string;`                   |
| **height**                 | Used to set height                    | `height?: number` \| `string;`           |
| **width**                  | Used to set width                     | `width?: number` \| `string;`            |
| **titleFont**              | Used to set title font                | `titleFont?: FontStyleInterface,`        |
| **titleColor**             | Used to set title color               | `titleColor?: string;`                   |
| **loadingTint**            | Used to set loading icon tint         | `loadingTint?: string;`                  |
| **emptyTextColor**         | Used to set empty state text color    | `emptyTextColor?: string;`               |
| **emptyTextFont**          | Used to set empty state text font     | `emptyTextFont?: FontStyleInterface;`    |
| **errorTextColor**         | Used to set error state text color    | `errorTextColor?: string;`               |
| **errorTextFont**          | Used to set error state text font     | `errorTextFont?: FontStyleInterface;`    |
| **separatorColor**         | Used to set the separator color       | `separatorColor?: string`                |
| **infoIconTint**           | Used to set info icon tint            | `infoIconTint?: string;`                 |
| **missedCallIconTint**     | Used to set missed call icon tint     | `missedCallIconTint?: string;`           |
| **outgoingCallIconTint**   | Used to set outgoing call icon tint   | `outgoingCallIconTint?: string;`         |
| **incomingCallIconTint**   | Used to set incoming call icon tint   | `incomingCallIconTint?: string;`         |
| **subtitleTextColor**      | Used to set the subtitle text color   | `subtitleTextColor?: string;`            |
| **subtitleTextFont**       | Used to set subtitle text font        | `subtitleTextFont?: FontStyleInterface;` |
| **dateTextFont**           | Used to set date text font            | `dateTextFont?: FontStyleInterface;`     |
| **dateTextColor**          | Used to set date text color           | `dateTextColor?: string;`                |
| **dateSeparatorTextFont**  | Used to set date separator text font  | `dateSeparatorTextFont?: string;`        |
| **dateSeparatorTextColor** | Used to set date separator text color | `dateSeparatorTextColor?: string;`       |

##### 2. Avatar Style

If you want to apply customized styles to the `Avatar` component within the `Call Logs` Component, you can use the following code snippet. For more information you can refer [Avatar Styles](/ui-kit/react-native/v4/avatar#avatarstyleinterface).

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import {
      CometChat,
      CometChatCalls,
      CallLogRequestBuilder,
    } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogs,
      BorderStyleInterface,
      AvatarStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const borderStyle: BorderStyleInterface = {
        borderWidth: 2,
        borderStyle: "solid",
        borderColor: "#cc5e95",
      };

      const avatarStyle: AvatarStyleInterface = {
        outerViewSpacing: 5,
        outerView: {
          borderWidth: 2,
          borderStyle: "dotted",
          borderColor: "blue",
        },
        border: borderStyle,
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              avatarStyle={avatarStyle}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 3. ListItem Style

If you want to apply customized styles to the `ListItemStyle` component within the `Call Logs` Component, you can use the following code snippet. For more information, you can refer [ListItem Styles](/ui-kit/react-native/v4/list-item#listitemstyle).

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import {
      CometChat,
      CometChatCalls,
      CallLogRequestBuilder,
    } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogs,
      ListItemStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const listItemStyle: ListItemStyleInterface = {
        titleColor: "red",
        backgroundColor: "#d2cafa",
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              listItemStyle={listItemStyle}
              hideSeperator={false}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### 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 `Call Logs` component.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import {
      CometChat,
      CometChatCalls,
      CallLogRequestBuilder,
    } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogs,
      ListItemStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const listItemStyle: ListItemStyleInterface = {
        titleColor: "red",
        backgroundColor: "#d2cafa",
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              title="Custom Title"
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              hideSeperator={false}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

Below is a list of customizations along with corresponding code snippets

| Property                     | Description                                 | Code                                 |
| ---------------------------- | ------------------------------------------- | ------------------------------------ |
| **title**                    | Used to set custom title                    | `title?: string`                     |
| **emptyStateText**           | Used to set custom empty state text         | `emptyStateText?: string`            |
| **errorStateText**           | Used to set custom error state text         | `errorStateText?: string`            |
| **datePattern**              | Used to set custom date pattern             | `datePattern?: DatePattern`          |
| **dateSeparatorPattern**     | Used to set custom date separator pattern   | `dateSeparatorPattern?: DatePattern` |
| **infoIcon**                 | Used to set custom info icon                | `infoIcon?: ImageType`               |
| **incomingAudioCallIconUrl** | Used to set custom incoming audio call icon | `incomingAudioCallIconUrl?: string`  |
| **incomingVideoCallIconUrl** | Used to set custom incoming video call icon | `incomingVideoCallIconUrl?: string`  |
| **missedAudioCallIconUrl**   | Used to set custom missed audio call icon   | `missedAudioCallIconUrl?: string`    |
| **missedVideoCallIconUrl**   | Used to set custom missed video call icon   | `missedVideoCallIconUrl?: string`    |
| **outgoingAudioCallIconUrl** | Used to set custom outgoing audio call icon | `outgoingAudioCallIconUrl?: string`  |
| **outgoingVideoCallIconUrl** | Used to set custom outgoing video call icon | `outgoingVideoCallIconUrl?: string`  |
| **hideSeperator**            | Option to hide separator                    | `hideSeperator?: boolean`            |
| **loadingIcon**              | Used to set custom loading icon             | `loadingIcon?: ImageType`            |
| **showBackButton**           | Used to show/hide the back button           | `showBackButto?: boolean`            |
| **BackButton**               | Used to set Custom Back Button              | `BackButton?: JSX.Element`           |
| **hideError**                | Used to hide errors                         | `hideError?: boolean`                |

***

### 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.

#### ListItemView

With this property, you can assign a custom ListItemViews to the Call Logs Component.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/Sa9o3dFd0TJV05JN/images/4586a5e5-call_logs_list_item_view_cometchat_screens-c00870326f9a286399251eda85a5baca.png?fit=max&auto=format&n=Sa9o3dFd0TJV05JN&q=85&s=06436ad1dd3239ed98f8e4d473d4409f" alt="Image" width="4498" height="3120" data-path="images/4586a5e5-call_logs_list_item_view_cometchat_screens-c00870326f9a286399251eda85a5baca.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/eLHw5QGTFIHJKVut/images/693b26d2-call_logs_list_item_view_cometchat_screens-01483c7b0ca9fac94d5e7ffa72966579.png?fit=max&auto=format&n=eLHw5QGTFIHJKVut&q=85&s=139b2cf816e5380cce425e2b493df44b" alt="Image" width="4498" height="3120" data-path="images/693b26d2-call_logs_list_item_view_cometchat_screens-01483c7b0ca9fac94d5e7ffa72966579.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogs,
      CometChatUiKitConstants,
    } from "@cometchat/chat-uikit-react-native";
    import {
      CallGroup,
      CallLog,
      CallUser,
    } from "@cometchat/calls-sdk-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const isInitiator = (
        initiator: CallUser,
        loggedInUser: CometChat.User
      ): boolean => {
        return initiator.getUid() == loggedInUser?.getUid();
      };

      const isMissedCall = (call: CallLog, loggedInUser: CometChat.User) => {
        const callStatus: any = call.getStatus();
        if (isInitiator(call.getInitiator(), loggedInUser)) {
          return callStatus === CometChatUiKitConstants.CALL_UNANSWERED;
        } else {
          return [
            CometChatUiKitConstants.CALL_BUSY,
            CometChatUiKitConstants.CALL_UNANSWERED,
            CometChatUiKitConstants.CALL_REJECTED,
            CometChatUiKitConstants.CALL_CANCELLED,
          ].includes(callStatus);
        }
      };

      const getListItemView = ({ call }: { call?: CallLog }) => {
        if (call) {
          let userOrGroup: CallUser | CallGroup = call.getInitiator();
          if (
            userOrGroup instanceof CallUser &&
            userOrGroup.getUid() == loggedInUser?.getUid()
          ) {
            userOrGroup = call!.getReceiver();
          }
          const name = userOrGroup.getName();
          const image =
            userOrGroup instanceof CallGroup
              ? userOrGroup.getIcon()
              : userOrGroup.getAvatar();
          return (
            <View style={viewStyle}>
              <CometChatAvatar
                image={user!.getAvatar() ? { uri: image } : undefined}
                name={name}
              />

              <View>
                <Text style={{ color: "black", fontWeight: "bold" }}>{name}</Text>
                <Text
                  style={{
                    color: isMissedCall(call, loggedInUser!)
                      ? theme.palette.getError()
                      : undefined,
                  }}
                >
                  {CallUtils.getCallStatus(
                    call as unknown as CometChat.Call,
                    loggedInUser!
                  )}
                </Text>
              </View>
            </View>
          );
        } else {
          return <> </>;
        }
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              ListItemView={getListItemView}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### SubtitleView

You can customize the `SubtitleView` for each call logs item to meet your requirements

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/dJudw7bxdEqknjCY/images/0f30d6ef-call_logs_subtitle_view_cometchat_screens-1224606be5581e81932e4db5bd80c414.png?fit=max&auto=format&n=dJudw7bxdEqknjCY&q=85&s=cbae2b599b68cd8ad013fcb9ff9d5dbf" alt="Image" width="4498" height="3120" data-path="images/0f30d6ef-call_logs_subtitle_view_cometchat_screens-1224606be5581e81932e4db5bd80c414.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/3ouLMA4YsO-gmlOS/images/6e3e466d-call_logs_subtitle_view_cometchat_screens-41730033cccf26ce286051fffa98127e.png?fit=max&auto=format&n=3ouLMA4YsO-gmlOS&q=85&s=d6029cdbe34737b9fcb996423369d1d6" alt="Image" width="4498" height="3120" data-path="images/6e3e466d-call_logs_subtitle_view_cometchat_screens-41730033cccf26ce286051fffa98127e.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";
    import { CallLog } from "@cometchat/calls-sdk-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const getSubtitleView = (call: CallLog) => {
        return (
          <Text
            style={{
              fontSize: 15,
              color: "grey",
              shadowColor: "red",
            }}
          >
            ** Custom Subtitle View **
          </Text>
        );
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              SubtitleView={getSubtitleView}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### TailView

You can customize the `TailView` for each call logs item to meet your requirements

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/tKDtB3xjE6jATqmt/images/076af7ea-call_logs_tail_view_cometchat_screens-2eba1f5aa2c14a0c111aa0d8f7153aa1.png?fit=max&auto=format&n=tKDtB3xjE6jATqmt&q=85&s=dcbbc0a49454185db9a997d8c4c6c5a9" alt="Image" width="4498" height="3120" data-path="images/076af7ea-call_logs_tail_view_cometchat_screens-2eba1f5aa2c14a0c111aa0d8f7153aa1.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/Sa9o3dFd0TJV05JN/images/44ad56a5-call_logs_tail_view_cometchat_screens-b0c813fce6c9092670dcd59bdeb759bc.png?fit=max&auto=format&n=Sa9o3dFd0TJV05JN&q=85&s=ffb88255205e4e2f6ebc0fd40092d323" alt="Image" width="4498" height="3120" data-path="images/44ad56a5-call_logs_tail_view_cometchat_screens-b0c813fce6c9092670dcd59bdeb759bc.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";
    import { CallLog } from "@cometchat/calls-sdk-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const getTailView = (call: CallLog) => {
        return (
          <Text
            style={{
              fontSize: 15,
              color: "grey",
              shadowColor: "red",
            }}
          >
            [CustomTailView]
          </Text>
        );
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              TailView={getTailView}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### LoadingStateView

You can set a custom loader view using `LoadingStateView` to match the loading view of your app.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/fYzY4CDkBxaMi0xU/images/17d2f501-call_logs_loading_view_cometchat_screens-7a0aa3883e830ccb0c1ac0991b857acb.png?fit=max&auto=format&n=fYzY4CDkBxaMi0xU&q=85&s=2c4ab81c1a3828e6d8577bc9241e8cbb" alt="Image" width="4498" height="3120" data-path="images/17d2f501-call_logs_loading_view_cometchat_screens-7a0aa3883e830ccb0c1ac0991b857acb.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/U1KbQ0VSXjjiH44y/images/53d729ba-call_logs_loading_view_cometchat_screens-926732bf883e83f3b0d4667ffffd39f7.png?fit=max&auto=format&n=U1KbQ0VSXjjiH44y&q=85&s=f79bb54cd2c0146cfdc32f1893b55775" alt="Image" width="4498" height="3120" data-path="images/53d729ba-call_logs_loading_view_cometchat_screens-926732bf883e83f3b0d4667ffffd39f7.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";
    import { CallLog } from "@cometchat/calls-sdk-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const loadingViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
      };

      const getLoadingStateView = () => {
        return (
          <View style={loadingViewStyle}>
            <Text style={{ fontSize: 20, color: "black" }}>Loading...</Text>
          </View>
        );
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              LoadingStateView={getLoadingStateView}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### EmptyStateView

You can set a custom `EmptyStateView` using `EmptyStateView` to match the empty view of your app.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/3ouLMA4YsO-gmlOS/images/70b94abb-call_logs_empty_view_cometchat_screens-299e7b6dd0ec0e6300349f0cf223de43.png?fit=max&auto=format&n=3ouLMA4YsO-gmlOS&q=85&s=94979f38259bd3bb000795afe2e4faf9" alt="Image" width="4498" height="3120" data-path="images/70b94abb-call_logs_empty_view_cometchat_screens-299e7b6dd0ec0e6300349f0cf223de43.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/POKce_Oe2FDpCjGg/images/60c32349-call_logs_empty_view_cometchat_screens-5b6485eaa717ccbaf9f5260a4255b4da.png?fit=max&auto=format&n=POKce_Oe2FDpCjGg&q=85&s=65651be58afb363d4a040b24ae4df517" alt="Image" width="4498" height="3120" data-path="images/60c32349-call_logs_empty_view_cometchat_screens-5b6485eaa717ccbaf9f5260a4255b4da.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogs } from "@cometchat/chat-uikit-react-native";
    import { CallLog } from "@cometchat/calls-sdk-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const datePattern: DatePattern = "timeFormat";
      const dateSeparatorPattern: DatePattern = "dayDateFormat";

      const emptyViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
        marginLeft: 2,
        marginRight: 2,
        marginBottom: 30,
      };

      const getEmptyStateView = () => {
        return (
          <View style={emptyViewStyle}>
            <Text style={{ fontSize: 80, color: "black" }}>Empty</Text>
          </View>
        );
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogs
              datePattern={datePattern}
              dateSeparatorPattern={dateSeparatorPattern}
              EmptyStateView={getEmptyStateView}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***
