Kotlin

Overview

Show the merged observability metrics on top of the call UI so anyone in the session can see live quality data. This will allow you to see and analyze how our statistics behave during a video session. Based on that you can expand this sample further on your own and set tresholds when to show messages to the user (e.g. about poor connection).

Display Stats in the UI

The sample uses ObservabilityStats model for gathering all stats data together, feel free to use a similar one in your project. For UI we use Jetpack Compose with the observabilityStats passed into VideoCallScreen. When stats are non-null, a semi-transparent overlay lists the fields:

Wire state from your activity:

Lifecycle and Session Pause/Resume

Forward activity lifecycle events to the session so media and stats keep working correctly: