Track quality of experience on Android track-quality-of-experience-on-android

The following instructions provide guidance for implementation across all 2.x SDKs.

If you are implementing a 1.x version of the SDK, you can download the 1.x Developers Guides here: Download SDKs.

Implemement QoS

  1. Identify when the bitrate changes during media playback and create the MediaObject instance using the QoS information.

    QoSObject variables:

    note tip
    These variables are only required if you are planning to track QoS.
    table 0-row-3 1-row-3 2-row-3 3-row-3 4-row-3 3-align-center 7-align-center 11-align-center 15-align-center 19-align-center
    Variable Description Required
    bitrate Current bitrate Yes
    startupTime Startup time Yes
    fps FPS value Yes
    droppedFrames Number of dropped frames Yes

    QoS object creation:

    code language-java
    MediaObject qosObject =
  2. Make sure that getQoSObject() method returns the most updated QoS information.

  3. When playback switches bitrates, call the BitrateChange event in the Media Heartbeat instance:

    code language-java
    public void onBitrateChange(Observable observable, Object data) {
        _heartbeat.trackEvent(MediaHeartbeat.Event.BitrateChange, null, null);
    note important
    Update the QoS object and call the bitrate change event on every bitrate change. This provides the most accurate QoS data.