directory
pageON THIS PAGE

Customize the ringtone

​The ringtone can be categorized into online ringtone and offline ringtone. In general, if you want to keep the online and offline ringtones consistent, you need to use the same ringtone file to complete this configuration.

Online call invitation

If you want to set the call ringtone for receiving incoming call invitations or sending outgoing call invitations, you can use the ringtoneConfig in the ZegoUIKitPrebuiltCallInvitationService's init function.

Here is the reference code:

Copy

Ringtone for offline call invitation in Android

  1. Place a ringtone audio file in the android/app/src/main/res/raw, see demo.

  2. If there is no keep.xml in your project, please refer to the demo and create one to ensure that the ringtone file will be included in your apk.

null
  1. When calling ZegoUIKitPrebuiltCallInvitationService.init, configure the androidNotificationConfig.sound parameter with the file name (without the file extension).

After the completion, the ringtone will be played when others receive System-UI offline call invitations.

Here is the reference code:

Copy

Ringtone for offline call invitation in iOS

Due to Apple's restrictions, System-UI offline call invitations(VOIP) can only use iOS system ringtones.

pageON THIS PAGE
backBack to top