> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Example app

> Run the bundled ExoPlayer app, one video per ad format, against your own publisher token.

The [`example`](https://github.com/kontextso/sdk-kotlin-video/tree/main/example) directory in the SDK repo is a small Android app with a real `ExoPlayer`: a home screen with four videos, one per ad format (the pause ad as a card and full screen), and a full-screen player that shows that video's ad. The whole integration is one file, `example/src/main/kotlin/so/kontext/video/example/PlayerActivity.kt`.

## Clone and run

You need JDK 17, the Android SDK with platform 35, and an emulator or device on Android 7.0 or later:

```bash theme={null}
git clone https://github.com/kontextso/sdk-kotlin-video.git
cd sdk-kotlin-video
./gradlew :example:installDebug
```

Or open the project in Android Studio and run the `example` module. Give an emulator 4 GB of memory or more: the player and the ad's WebView run at once.

## Point it at your account

The example runs against Kontext's ad server with a demo token. In `example/src/main/kotlin/so/kontext/video/example/ExampleApp.kt`, put your own token into the `Configuration`:

```kotlin theme={null}
KontextVideo.initialize(this, Configuration("<your-publisher-token>") { logLevel = Configuration.LogLevel.DEBUG })
```

## What you should see

Open a video: the clip plays full screen and the SDK prepares that video's ad.

* **Pause card**: tap to pause, and the pause card appears; tap again to resume. A fresh ad is ready for the next pause.
* **Full-screen pause**: tap to pause, and the ad covers the player; its Resume button resumes the content.
* **Overlay**: after three seconds of playing, a strip appears over the player and goes away by itself; pausing ends it at once.
* **Linear**: after three seconds of playing, the content pauses and the full-screen ad plays; the content resumes when it ends.

The line above the title shows the ad's price once it is ready, then the last listener callback. Leaving the screen ends the video's ads. `adb logcat -s KontextVideo` shows the SDK's log.

## Links

* [Video SDK on GitHub](https://github.com/kontextso/sdk-kotlin-video)
* [Example app](https://github.com/kontextso/sdk-kotlin-video/tree/main/example)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.