StreaMix SDK is an Android library (AAR) that provides production‑grade video playback with integrated server‑driven advertising for Android TV and Fire TV applications.
It wraps ExoPlayer (AndroidX Media3) and Google IMA SDK into a compact, opinionated API, so client apps can focus on UI and business logic instead of low‑level playback and ad orchestration.
Features
HLS/DASH/SmoothStreaming playback on Android TV and Fire TV
Integrated ad scheduling via VMAP/VAST
Pre‑roll, mid‑roll, post‑roll and on‑pause ads
Unified behavior for Android TV and Fire OS
Simple launcher API for fast integration
Advanced API with full control over player UI and lifecycle
Requirements
Platform: Android TV, Fire TV (Android‑based)
minSdk: 24 (Android 7.0)
targetSdk / compileSdk: 35
Language: Java 17 (with core library desugaring)
Installation (consumer app)
Add the dependency to your app module:
dependencies {
implementation "com.streamix.sdk:streamixsdk:<version>"
}Make sure your android block is configured for Java 17 and desugaring, and that you exclude the Java 9 OSGi manifest from a transitive dependency:
android {
compileSdk 35
defaultConfig {
minSdk 24
targetSdk 35
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true
}
packaging {
resources {
excludes += 'META-INF/versions/9/OSGI-INF/MANIFEST.MF'
}
}
}
dependencies {
implementation "com.streamix.sdk:streamixsdk:<version>"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
}For details and variations, see docs/SDK_USER_GUIDE_EN.md.
Quick start
1. Initialize SDK via StreaMixLauncher
StreaMixLauncher.Init(
applicationContext,
"1",
"167",
"DemoApp",
null,
null
);
2. Create a MediaItem
MediaItem mediaItem = new MediaItem(
"https://example.com/video.m3u8",
"Movie Title",
"1",
"456",
3600,
null
);
3. Start playback
StreaMixLauncher.playVideo(
this,
mediaItem,
true
);For advanced integration (custom player Activity, custom ExoPlayer factory, fine‑grained lifecycle control), use StreaMixSDK directly as described in docs/SDK_USER_GUIDE_EN.md and docs/SDK_INTEGRATION_EXAMPLES_EN.md.
Demos
The repository includes three demo apps under demo/ that showcase different integration levels:
SimpleDemo – minimal integration via StreaMixLauncher and built‑in PlayerActivity.
CustomExoDemo – custom ExoPlayer configuration while using the SDK player Activity.
FullDemo – full integration with a custom player Activity and layout using StreaMixSDK directly.
Demos can be built either against the SDK source module or against a published binary AAR (local Maven). See publish-sdk-local.sh and Gradle properties for details.
Documentation
English documentation (in docs/):
SDK_OVERVIEW_EN.md – high‑level overview and architecture
SDK_USER_GUIDE_EN.md – installation and integration guide
SDK_INTEGRATION_EXAMPLES_EN.md – end‑to‑end integration examples based on demos
Development (this repository)
This project builds an Android library module streamixsdk and publishes it as an AAR to a local Maven repository for use by the demo apps.
Typical flow for local development:
Make changes in the streamixsdk module.
Run ./publish-sdk-local.sh to build, generate JavaDoc and publish the AAR to local-maven-repo/.
Build and run one of the demos (SimpleDemo, CustomExoDemo, FullDemo) with useSourceSDK=false to validate the binary SDK.
The public API surface is defined by ProGuard/R8 keep rules in streamixsdk/proguard-rules.pro and by the generated JavaDoc.