Skip to content
Last updated

The Android SDK exposes real time information related to call quality. By using this API you can be notified as soon as any degradation of connectivity metrics is observed and adjust your application UI, providing visible feedback to the user.

Accessing call quality component

The Android SDK provides access to call quality features via the CallQualityController interface. Each Call object provides its own CallQualityController for accessing quality features of that specific call.

    import com.sinch.android.rtc.calling.Experimental

    val call: Call // Any call instance provided by the SDK
    val callQualityController = Experimental.qualityController(call)

Call quality warning events

The Android SDK provides information about quality warning events via CallQualityWarningEventListener interface. The below snippet demonstrates how to assign and remove your listener for those events.

    import com.sinch.android.rtc.calling.Experimental

    val callQualityController = Experimental.qualityController(call)
    val myCallQualityWarningEventListener = CallQualityWarningEventListener { callQualityWarningEvent ->  exp
        // Handle the warning event
    }
    // Add your listener
    callQualityController.addCallQualityWarningEventListener (myCallQualityWarningEventListener)
    // Remove your listener
    callQualityController.removeCallQualityWarningEventListener(myCallQualityWarningEventListener)

The CallQualityWarningEvent object passed inside the callback provides the following information about the event observed:

  • Name of the warning
  • Type of the event. Can be either Trigger or Recover depending if given metric degradation has just occured or if it returned to expected value.
  • Media stream type of the warning. This is included only for warnings that can be bound to individual streams (Audio or Video).

The below table summarizes the possible types of CallQualityWarningEvent objects being emmitted by the Andorid SDK:

TypeFrom
(Android SDK version)
Contains MediaStreamTypeTrigger conditionsRecovery conditions
HighRemoteInboundRttWarningEvent6.3.9YESRound Trip Time (RTT) of packets is greater 300 msRound Trip Time (RTT) drops below 300 ms
HighInboundJitterWarningEvent6.3.9YESInbound jitter is greater then 30 ms for 3 out of last 4 samplesTrigger conditions are no longer sustained
HighInboundPacketLossWarningEvent6.3.9YESInbound packet loss is greater then 1% in 3 out of last 4 samplesTrigger conditions are no longer sustained
MissingMediaStreamWarningEvent6.3.9NOICE state is not CONNECTED during the time the call is establishedICE state reaches CONNECTED state.
ConstantOutboundAudioLevel6.7.11NO (audio only)Standard deviation of outbound audio level measurements from last 20 seconds (before 6.9.19 8 seconds) is lower then 0.5% of the maximum possible audio level value.Trigger conditions are no longer sustained.
ConstantInboundAudioLevel6.7.11NO (audio only)Standard deviation of inbound audio level measurements from last 20 seconds (before 6.9.19 8 seconds) is lower then 0.5% of the maximum possible audio level value.Trigger conditions are no longer sustained.
zeroInboundAudioLevel6.9.19NO (Audio only)The audio level measurements of the inbound rtp audio stream from last 2 seconds are equal to 0.Trigger conditions are no longer sustained
zeroOutboundAudioLevel6.9.19NO (Audio only)The audio level measurements of the outbound rtp audio stream from last 2 seconds are equal to 0.Trigger conditions are no longer sustained
LowOSOutputVolumeLevel6.7.11NO (audio only)Volume (on platform level) as set by the user or externally by 3rd party application is within lower 25% range. The factor is measured by observing STREAM_VOICE_CALL volume changes.Trigger conditions are no longer sustained.

More resources on SDK specifics

For more detailed documentation of properties, classes and other Kotlin Android SDK specific structures see the Dokka documentation included inside the SDK archive available at the SDK downloads page.