---
updatedAt: 2026-07-27T09:54:14.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/v0/llms.txt
---

# Getting started (Android SDK)

# Overview

## Repository

The Android SDK is available on [Nexus](https://mvn.dailymotion.com/#browse/browse:releases).

## Key Features

* Developed in `Kotlin 2.2.21` (require`Kotlin 2.+` starting from sdk `v2.0.0` included)
* Remote player management
* Verified Google IMA integration
* OMSDK support
* TCF2 support
* Access to Player events and state facilitated
* Fullscreen playback management
* Chromecast support <br />

## Supported versions & requirements

|                    |
| ------------------ |
| `minSdk set to 23` |

## Dependencies

The following dependencies are required:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>

      </th>

      <th>

      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Player dependencies
      </td>

      <td>
        * `androidx.fragment:fragment:1.8.9`
        * `org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2`
      </td>
    </tr>

    <tr>
      <td>
        Advertising dependencies
      </td>

      <td>
        `com.google.ads.interactivemedia.v3:interactivemedia:3.33.0`
      </td>
    </tr>
  </tbody>
</Table>

<br />

> 📘 Note
>
> DM advertising SDK includes IMA Native. This will require additional dependencies to work. Those additional dependencies can be found in **[Android IMA SDK integration guide](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side#2.-add-the-ima-sdk-to-your-project)**.

<br />

***

# Installation

## 1. Create an Android Player configuration

As a first step you need to create a custom player configuration for your Android application in your Dailymotion account. A unique Player Id will be generated which will be required for player initialization in-app, accurate monetization, targeting and attribution.

The custom player configuration can be created and managed either through the [“Players” tab in the Dailymotion Studio](https://www.dailymotion.com/partner/embed/players) or programmatically via the [Platform API](https://developers.dailymotion.com/v0/reference/partner-api-create-a-player).

<Image align="center" src="https://files.readme.io/9b0b7fd428fba1b29983571f2769db9535f408f30f3e51fd1f67d8a98dbfc06e-Dailymotion-Studio-Player-Configuration-Android-1024x514.png" />

> 📘 Note
>
> “Picture-in-Picture”, “First time viewable”, “Aspect ratio” and “Use embedder link when sharing” features are not available on the Android SDK and are reserved for JavaScript embeds.

> ⚠️ CMP implementation required to ensure monetization
>
> Publishers in GDPR countries are required to implement a TCF2 registered CMP (Consent Management Platform) in their native app to ensure monetization. A compliant CMP must be used to use IAB TCF2 for the creation and storage of the transparency & consent string. As Dailymotion fully supports the IAB TCF2 standard, our native SDKs and our Player can access this string received from the CMP in-app.
>
> **It’s important that the consent string is available before the Player is loading**. For information on how to use a CMP in-app see **[here](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#how-is-a-cmp-used-in-app)**.

***

<br />

### 2 - Add the SDK to your project

<br />

**Step 1 - Add the Dailymotion Maven repository**

The Android SDK is available on [Nexus](https://mvn.dailymotion.com/#browse/browse:releases)

.Gradle (your app’s build system) needs to know where to download the Dailymotion Android SDK from, so we need to add this address to your app configuration:

1. Open your settings.gradle file.
2. Inside the `dependencyResolutionManagement` block, add our Maven repository like this:

```kotlin
dependencyResolutionManagement {
    ...
    repositories {
        ...
        maven {
            name = "DailymotionMavenRelease"
            url = "https://mvn.dailymotion.com/repository/releases/"
        }
        ...
    }
    ...
}
```

<br />

**Step 2 - Add the SDK dependencies**

Once your app knows where to find the SDK, it needs to actually install it, along with a few companion tools.

These are the actual building blocks your app needs to display videos, handle ads (if you want), and make everything run smoothly.

In your app’s `build.gradle` file, add:

```kotlin
dependencies {
    implementation 'com.dailymotion.player.android:sdk:2.1.1' // Main video player
    implementation 'androidx.fragment:fragment:1.8.9' // Needed to show video in part of the screen
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2' // Smooth background loading

    // Optional: for video ads
    implementation 'com.dailymotion.player.android:ads:2.1.1'
    implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0'
}
```

> 📘 Note:
>
> If you’re already using `androidx.appcompat:appcompat`, you can skip adding `androidx.fragment:fragment`. It’s included by default.

<br />

### 3 - **Create and add PlayerView** to view hierarchy

Now that your app has everything installed, it’s time to actually create the video player and show it on screen.

Create a `PlayerView` using `Dailymotion.createPlayer(...)` method:

```kotlin
Dailymotion.createPlayer(
    context = context,
    playerId = "MY_PLAYER_ID", // replace by desired player id
    videoId = "A_VIDEO_ID", // replace by desired video id
    playerSetupListener = object : Dailymotion.PlayerSetupListener {
        override fun onPlayerSetupSuccess(player: PlayerView) {
            // Add the PlayerView to your screen here (e.g., inside a layout)
        }

        override fun onPlayerSetupFailed(error: PlayerError) {
            // Handle error (e.g., network issue or bad video ID)
        }
    }
)
```