CometChatOutgoingCall
Component is a visual representation of a user-initiated call, whether it’s a voice or video call. It serves as an interface for managing outgoing calls, providing users with essential options to control the call experience. This component typically includes information about the call recipient, call controls for canceling the call, and feedback on the call status, such as indicating when the call is in progress.
CometChatOutgoingCall
being a custom component, offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
Since CometChatOutgoingCall
can be launched by adding the following code snippet into the XML layout file.
CometChatOutgoingCall
within the XML code or in your activity or fragment then you’ll need to extract them and set the User object or Call object using the appropriate method.
CometChatOutgoingCall
into your Activity and Fragment by adding the following code snippets into the respective classes.
setOnEndCallClick
action is typically triggered when the end call button is clicked, carrying out default actions. However, with the following code snippet, you can effortlessly customize or override this default behavior to meet your specific needs.
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.
Events emitted by the Outgoing call component are as follows.
Event | Description |
---|---|
onOutgoingCallAccepted | Triggers when the outgoing call is accepted. |
onOutgoingCallRejected | Triggers when the outgoing call is rejected. |
Methods | Description | Code |
---|---|---|
setCall | Used to set the Call object against which we need to display the outgoing screen | .setCall(Call call) |
setCallSettingsBuilder | Sets the CallSettingsBuilder for the outgoing call configuration. | setCallSettingsBuilder(CometChatCalls.CallSettingsBuilder callSettingsBuilder) |
disableSoundForCalls | used to enable/disable sound for outgoing call , default false | .disableSoundForMessages(false); |
setCustomSoundForCalls | used to set custom sound for outgoing calls | .setCustomSoundForMessages(@RawRes resource); |