Track quality of experience on Android
Last update: June 25, 2024
- Topics:
- Media Analytics
CREATED FOR:
- User
- Admin
- Developer
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.
Implement QoS
-
Identify when the bitrate changes during media playback and create the
MediaObject
instance using the QoS information.QoSObject variables:
TIP
These variables are only required if you are planning to track QoS.VariableDescriptionRequiredbitrate
Current bitrateYesstartupTime
Startup timeYesfps
FPS valueYesdroppedFrames
Number of dropped framesYesQoS object creation:
MediaObject qosObject = MediaHeartbeat.createQoSObject(<BITRATE>, <STARTUP_TIME>, <FPS>, <DROPPED_FRAMES>);
-
Make sure that
getQoSObject()
method returns the most updated QoS information. -
When playback switches bitrates, call the
BitrateChange
event in the Media Heartbeat instance:public void onBitrateChange(Observable observable, Object data) { _heartbeat.trackEvent(MediaHeartbeat.Event.BitrateChange, null, null); }
IMPORTANT
Update the QoS object and call the bitrate change event on every bitrate change. This provides the most accurate QoS data.
recommendation-more-help
c8eee520-cef5-4f8c-a38a-d4952cfae4eb