tencent cloud


Last updated: 2024-05-08 11:37:24
    This document describes how to replace the incoming call ringtone of TUICallKit, which is divided into Application Ringtone and Offline Push Ringtone.

    First, Setting Application Ringtone

    There are two ways to set the application ringtone: replace the ringtone audio, or call the Setting Ringtone API.

    1, Replace Audio File

    If you include the TUICallKit component via source code dependency, you can replace the three audio files under the assets\\audios folder to achieve the purpose of changing the ringtone:
    File Name
    Ringtone when initiating a call
    Ringtone when the call is disconnected
    Ringtone when receiving a call

    2, Set Ringtone API

    You can also use the setCallingBell interface to set the incoming call ringtone.
    TUICallKit.instance.setCallingBell('flie path');

    3, Setting the Mute Mode

    If you do not require a ringtone, you can use enableMuteMode to set the mute mode.

    Second, Setting Offline Push Ringtone

    1, iOS

    VoIP push doesn't support customizing push ringtones. APNs push allows modifying the parameters in call and groupcall interfaces, under params including TUIOfflinePushInfo.iOSSound for setting offline message ringtones on the iOS platform.

    2, Android

    The API supports Huawei, Xiaomi, FCM, and APNS.
    FCM's push ringtone is set as the application ringtone.
    For Huawei, Xiaomi, and APNS push ringtone settings, please set the TUIOfflinePushInfo.iOSSound's iOSSound and androidSound fields when calling Call and GroupCall.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support