\chapter{Triton Digital® Mobile SDK — Android Sample}
\hypertarget{md_templates_2sample_2README}{}\label{md_templates_2sample_2README}\index{Triton Digital® Mobile SDK — Android Sample@{Triton Digital® Mobile SDK — Android Sample}}
\label{md_templates_2sample_2README_autotoc_md0}%
\Hypertarget{md_templates_2sample_2README_autotoc_md0}%
 This project is a runnable sample application that demonstrates how to integrate and use the {\bfseries{Triton Digital® Mobile SDK for Android}}. It shows the most common use cases — live station playback, on-\/demand stream playback, multi-\/station switching, side-\/band metadata (SBM) and cue points, cue-\/point history, Google Cast, and on-\/demand advertising (banners and interstitials).

The sample links against the SDK as a packaged {\ttfamily .aar} (see How the SDK is referenced), so it builds and runs exactly the way an external integrator would consume the SDK.\hypertarget{md_templates_2sample_2README_autotoc_md1}{}\doxysection{\texorpdfstring{Always on the latest versions}{Always on the latest versions}}\label{md_templates_2sample_2README_autotoc_md1}
A core goal of this SDK — and of this sample — is to stay current with the latest Android tooling and dependencies, so your app benefits from the newest platform features, performance improvements, and security fixes. Both the SDK and this sample are kept up to date with\+:


\begin{DoxyItemize}
\item the {\bfseries{latest Android Gradle Plugin and Gradle}} releases,
\item the {\bfseries{latest compile/target SDK}} (API level), validated each release,
\item {\bfseries{Media3 / Exo\+Player}} — the current, actively maintained playback stack
\item the {\bfseries{latest Google Play Services}} (Cast, Base, Analytics) and AndroidX libraries.
\end{DoxyItemize}

Dependency versions are centralized in a {\bfseries{Gradle version catalog}} ({\ttfamily gradle/libs.\+versions.\+toml}) to make staying current straightforward.\hypertarget{md_templates_2sample_2README_autotoc_md2}{}\doxysection{\texorpdfstring{Tooling \& versions}{Tooling \& versions}}\label{md_templates_2sample_2README_autotoc_md2}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Component   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Version    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Component   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Version    }\\\cline{1-2}
\endhead
Triton Android SDK   &3.\+6.\+2    \\\cline{1-2}
Min SDK   &API 23 (Android 6.\+0 Marshmallow)    \\\cline{1-2}
Compile / Target SDK   &API 37    \\\cline{1-2}
Java   &17    \\\cline{1-2}
Gradle   &9.\+5.\+1    \\\cline{1-2}
Android Gradle Plugin   &9.\+2.\+1    \\\cline{1-2}
Media3 / Exo\+Player   &1.\+10.\+1    \\\cline{1-2}
AndroidX App\+Compat   &1.\+7.\+1   \\\cline{1-2}
\end{longtabu}


\begin{quote}
These are the versions this sample was released with. The SDK and sample track the latest stable releases, so newer versions may apply to later SDK builds. \end{quote}
\hypertarget{md_templates_2sample_2README_autotoc_md3}{}\doxysection{\texorpdfstring{Prerequisites}{Prerequisites}}\label{md_templates_2sample_2README_autotoc_md3}

\begin{DoxyItemize}
\item \href{https://developer.android.com/studio}{\texttt{ Android Studio}} (latest stable release recommended)
\item {\bfseries{JDK 17}} (bundled with recent Android Studio releases)
\item An Android device or emulator running {\bfseries{Android 6.\+0 (API 23) or newer}}
\end{DoxyItemize}\hypertarget{md_templates_2sample_2README_autotoc_md4}{}\doxysection{\texorpdfstring{Getting started}{Getting started}}\label{md_templates_2sample_2README_autotoc_md4}
Open the project in Android Studio ({\bfseries{File → Open}}, then select this folder) and click {\bfseries{Run}}\hypertarget{md_templates_2sample_2README_autotoc_md5}{}\doxysection{\texorpdfstring{How the SDK is referenced}{How the SDK is referenced}}\label{md_templates_2sample_2README_autotoc_md5}
The SDK ships as a single {\ttfamily .aar} located in {\ttfamily sample/libs/}. The sample resolves it via a {\ttfamily flat\+Dir} repository, using the artifact name provided by the {\ttfamily TRITON\+\_\+\+SDK} Gradle property (set in this project\textquotesingle{}s {\ttfamily gradle.\+properties})\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{repositories\ \{}
\DoxyCodeLine{\ \ \ \ flatDir\ \{\ dirs("{}libs"{})\ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{dependencies\ \{}
\DoxyCodeLine{\ \ \ \ api(mapOf("{}name"{}\ to\ (property("{}TRITON\_SDK"{})\ as\ String),\ "{}ext"{}\ to\ "{}aar"{}))}
\DoxyCodeLine{\ \ \ \ //\ …\ AndroidX,\ Media3,\ and\ Play\ Services\ dependencies\ (see\ sample/build.gradle.kts)}
\DoxyCodeLine{\}}

\end{DoxyCode}


Because the SDK exposes some of its dependencies as {\ttfamily implementation} (not {\ttfamily api}), the app declares a few of them directly (e.\+g. App\+Compat, Media3, Play Services Cast). All of these are managed through the version catalog in {\ttfamily gradle/libs.\+versions.\+toml}.\hypertarget{md_templates_2sample_2README_autotoc_md6}{}\doxysection{\texorpdfstring{What\textquotesingle{}s inside}{What's inside}}\label{md_templates_2sample_2README_autotoc_md6}
The sample is organized by feature, with one Activity per use case\+:


\begin{DoxyItemize}
\item {\bfseries{Player}} — station playback, on-\/demand stream playback, multi-\/station switching, side-\/band metadata / cue points, cue-\/point history, and Google Cast.
\item {\bfseries{Ads}} — turnkey interstitial ads, custom-\/rendered ads with manual impression/click tracking, and companion banners.
\end{DoxyItemize}\hypertarget{md_templates_2sample_2README_autotoc_md7}{}\doxysection{\texorpdfstring{Documentation \& support}{Documentation \& support}}\label{md_templates_2sample_2README_autotoc_md7}
For full API documentation and integration guidance, see the Triton Digital® Mobile SDK for Android documentation included with the SDK release. 