Skip to main content
Version: 2.x.x

External Call Detection Events - Android

VideoSDK provides external call detection events that notify you when a participant is on another call while in a meeting. These events help track call states and handle UI changes accordingly.

onExternalCallRinging

  • Triggered when an external phone call is ringing on the device.

onExternalCallStarted

  • Triggered when an external phone call starts on the device, such as when the participant answers an incoming call or places an outgoing call.

onExternalCallHangup

  • Triggered when an external phone call ends on the device.

All of the above methods can be implemented in the abstract class MeetingEventListener and added as listeners to the Meeting class using the addEventListener() method.

For example, suppose a meeting is running with Alice and Bob. If Alice receives a call, only Alice will receive the onExternalCallRinging event.

Example

private val meetingEventListener: MeetingEventListener = object : MeetingEventListener() {
// ...
override fun onExternalCallRinging() {
Log.d("#VideoSDK", "onExternalCallRinging")
}

override fun onExternalCallStarted() {
Log.d("#VideoSDK", "onExternalCallStarted")
}

override fun onExternalCallHangup() {
Log.d("#VideoSDK", "onExternalCallHangup")
}
}

override fun onCreate(savedInstanceState: Bundle?) {
// ...

// Add listener to meeting
meeting!!.addEventListener(meetingEventListener)
}

API Reference

The API references for all the methods and events utilized in this guide are provided below.

Got a Question? Ask us on discord