MediaMelon Android Custom SDK Integration Document
This guide provides detailed instructions on integrating the Android MediaMelon Custom SDK .
Step 1: Set Up Build Environment
Step 2: Register and Initialize the SDK
Step 3: Report Custom Metadata
Step 4: Report Playback Events
Step 5: Report Stream and Network Related Information
Step 6: Report Request Status and Fallback Events
Step 7: Report Ad Events
Step 8: Report Custom Events
Step 1: Set up the build environment
Step 1.1: Add Gradle Dependency:
Add MediaMelon SDK gradle dependency to
app/build.gradle
dependencies {
...
implementation 'com.github.MediamelonSDK:mm-java-custom-sdk:1.2.11'
}Step 1.2 Provide Permissions
Add network permissions to AndroidManifest.xml
Step 1.3: Import Packages
Step 2: Register and Initialise SDK
The player application must register the SDK and provide player information once the player is initialized. Please note that values provided in this integration step persist across video sessions.
The SDK must be initialized at the start of each video session. Initialization includes setting the application context, initializing the playback session, and indicating the intent for playback with the SDK.
Step 2.1: Set Context
Set the application context
Step 2.2: Register SDK
Step 2.3: Report Player Information
Step 2.4: Report Base Player Information
Step 2.5: Report Application Information
Step 2.6: Report Device Information
Step 2.7: Initialize session with Content Metadata
Step 2.8: Report Experiment Name
Step 2.9: Report View Session Id
Step 2.10: Report Sub Property Id
Step 2.11: Report Preload
Step 2.12: Report App Session ID
Report Application Session ID
Step 2.13: Report Device ID
Step 2.14 Report Device Marketing Name
Step 3: Report Custom Metadata
Check the custom tags configuration in your dashboard and report accordingly. If the custom tags are not configured, please configure and use them accordingly.
Step 4: Report Playback Events
Step 4.1: Report Player State
Report the player state using the following function.
Step 4.2: Report Buffering Events
Step 4.3: Report Seek Events
Step 4.4: Report Errors
Step 4.5: Report Warnings
Step 4.6: Report Playback Position
Step 5: Report Stream and Network Related Information
Step 5.1: Report Stream URL
Report stream URL that is currently being used.
Step 5.2: Report Video Duration
Step 5.3: Report Stream Information
Report Information related to the stream
Step 5.4: Report Network Information
Step 5.5: Report CDN
Step 5.6: Report Track Information
Step 5.7: Report Rendition
Report changes in the rendition of the current stream wrapped in the Rendition object.
Step 5.7: Update DRM Type
Step 5.8: Report Player Download Rate
Report Player download rate in bps
Step 5.9: Report Frame Loss
Step 5.10: Report Encoding Service
Step 6: Report Request Status and Fallback Events
Step 6.1: Report Request Status
Step 6.2: Report Fallback event
Report fallback events in case a fallback strategy is applied.
Step 6.3: Update Content Metadata
Step 6.4: Update Subscriber Info
Step 7: Report Ad Events
Step 7.1: Report Ad Start and End
Step 7.2: Report Ad Buffering:
Use Ad Buffering APIs to report any buffering that occurs during ad playback. For any buffering event, either content buffering or ad buffering should be reported, but not both.
Step 8: Report Custom Events
The Custom Events API can be used to report events that are not covered by the default MediaMelon-supported events. Custom events must be reported within the SDK activity lifecycle. Events reported before SDK initialization or after session end will be ignored. Please refer to the guidelines and constraints below.
Release Notes
Last updated