---
updatedAt: 2026-08-24T07:50:32.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/llms.txt
---

# Android SDK Migration guide

This guide is intended to help you migrate from the legacy native SDK to our **[new Android SDK](https://developers.dailymotion.com/v2/docs/getting-started-with-the-android-sdk)**.

<Callout icon="❗️" theme="error">
  ### Sunset notice legacy SDK:

  As of February 3rd 2026, the legacy Android SDK has been sunset and is no longer supported.

  To avoid any disruption, it is required for all Partners still using it to **migrate to the new Android SDK following guidelines below.**

  If you have questions or need assistance, please reach out to our [Support team](https://faq.dailymotion.com/hc/requests/new).
</Callout>

<br />

# Overview

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

      </th>

      <th>

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

  <tbody>
    <tr>
      <td>
        **New repository**
      </td>

      <td>
        - New Android SDK available on [Nexus](https://mvn.dailymotion.com/#browse/browse:releases)
      </td>
    </tr>

    <tr>
      <td>
        **Sample applications**
      </td>

      <td>
        - [**Android sample app:**](https://app.bitrise.io/installable-artifacts/64833972-0a5a-4725-8e46-296c383a18db/public-install-page/23828d8b46e1aa3499ea03793d0d27f8) Download the sample app on your device and explore the SDK functionalities in a user-friendly UI
        - [**Source code:**](https://github.com/dailymotion/player-sdk-android-samples) Access the sample app source code, customize it as you wish and easily integrate the SDK into your projects
      </td>
    </tr>

    <tr>
      <td>
        **Key features**
      </td>

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

    <tr>
      <td>
        **Minimum supported versions**
      </td>

      <td>
        `minSdk set to 23`
      </td>
    </tr>
  </tbody>
</Table>

<br />

# Implementation resources

<Cards>
  <Card title="Getting started with the iOS SDK" href="https://developers.dailymotion.com/v2/docs/getting-started-with-the-android-sdk" icon="fa-rocket">

  </Card>

  <Card title="SDK Reference" href="https://developers.dailymotion.com/reference/android-sdk-player-methods" icon="fa-code">

  </Card>

  <Card title="Dependencies" href="https://developers.dailymotion.com/docs/getting-started-with-the-android-sdk#dependencies" icon="fa-code">

  </Card>
</Cards>

<br />

# Benefits

**Key benefits of the new Android SDK:**

* **More customization:** The new Android SDK offers more customization options and greater flexibility in managing Player configurations via the [Studio](https://www.dailymotion.com/partner/embed/players). Embedding and controlling your Players is easier and more efficient thanks to Player IDs.
* **Better monetization:** The new SDK complies with Google IMA standards and TCF2 to help you handle monetization more effectively
* **Improved developer experience:** The new SDK provides an easier way to embed and control custom Players, and simplified access to various data

<br />

***

<br />

# Integration principles

Find the key technical steps required to implement our new Android SDK the best way and benefit from improved functionalities and flexibility compared to the legacy one.

<br />

## Player customization

While the legacy SDK could only offer limited customization options and control, the **new SDK is built around Player IDs**. They carry your **Player configuration**, providing more flexibility and control over the Player’s behavior and appearance without requiring heavy customization within your code:

* **Manage from Studio:** You can easily create and manage custom Player configurations from the [Dailymotion Studio.](https://www.dailymotion.com/partner/embed/players)
* **Embed Player IDs:** Each Player configuration is linked to a **unique Player ID** which is required for **Player initialization** in your iOS app, and **accurate monetization, targeting and attribution**.
* **Optimize with API:** Additional customization can be added programmatically using the [Player methods, events and states](https://developers.dailymotion.com/v2/reference/android-sdk-player-methods).

Learn more about how to [create and manage Players from the Studio](https://faq.dailymotion.com/hc/articles/4408224350994).

<br />

## Advertising dependencies

The IMA SDK is already integrated into the new SDK, however, it requires [**declaring additional dependencies**](https://developers.dailymotion.com/v2/docs/getting-started-with-the-android-sdk#dependencies) to load the IMA libraries.

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 />

## Fullscreen management

The new Android SDK provides an **out-of-the-box** fullscreen implementation as well as a **custom** fullscreen implementation supporting navigation stack using either Android standard `FragmentManager` or `Android Jetpack Navigation library`.

See how to [implement fullscreen](https://developers.dailymotion.com/v2/docs/out-of-the-box-fullscreen-implementation-android) with the new SDK.

<br />

## Destroy/release Player

The Player instance can be **automatically destroyed** by the Android system’s garbage collector or manually destroyed using the [`destroy()`](https://developers.dailymotion.com/v2/reference/android-sdk-player-methods#destroy) method.

See how to [destroy the Player](https://developers.dailymotion.com/v2/docs/destroy-the-player-with-android-sdk).

<br />

## TCF2 consent management

The Android SDK complies with IAB TCF2 standards to manage user consent using a recognized CMP. The Player will automatically attempt to access consent strings stored in the CMP.

See how to implement [TCF2](https://developers.dailymotion.com/v2/docs/tcf2#android).

<br />

***

<br />

# Mapping

This section provides a mapping of the methods, events and state from the legacy SDK to the new Android SDK to help you update your integration.

<br />

## Methods

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Legacy Android methods
      </th>

      <th>
        New Android methods
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `initialize()`
      </td>

      <td>
        `dailymotion.createPlayer(
                                                        context: Context,
                                                        playerId: String,
                                                        videoId: String?,
                                                        playlistId: String?,
                                                        playerParameters: PlayerParameters,
                                                        playerListener: PlayerListener?,
                                                        videoListener: VideoListener?,
                                                        adListener: AdListener?,
                                                        playerSetupListener: PlayerSet)`
      </td>
    </tr>

    <tr>
      <td>
        `load()`
      </td>

      <td>
        `load​Content(video​Id: String?, playlist​Id:​ String?, start​Time:​ Long?)`
      </td>
    </tr>

    <tr>
      <td>
        `play()`
      </td>

      <td>
        `play()`
      </td>
    </tr>

    <tr>
      <td>
        `pause()`
      </td>

      <td>
        `pause()`
      </td>
    </tr>

    <tr>
      <td>
        `setFullScreenButton(Boolean)`
      </td>

      <td>
        `setFullScreen(fullscreen: Boolean, orientation: Orientation)`<br />[Learn more](https://developers.dailymotion.com/v2/docs/out-of-the-box-fullscreen-implementation-android)
      </td>
    </tr>

    <tr>
      <td>
        `setCustomConfig()`
      </td>

      <td>
        `setCustomConfig(customConfig:)`<br />[Learn more](https://developers.dailymotion.com/v2/docs/custom-config#implement-customconfig-with-android-sdk)
      </td>
    </tr>

    <tr>
      <td>
        `unmute()`
      </td>

      <td>
        `setVolume(volume: 1.0)` (or the previous level)
      </td>
    </tr>

    <tr>
      <td>
        `mute()`
      </td>

      <td>
        `setVolume(volume: 0.0)`
      </td>
    </tr>

    <tr>
      <td>
        `callPlayermethod(String, Object)`
      </td>

      <td>
        No longer supported.
      </td>
    </tr>

    <tr>
      <td>
        `setPlayWhenReady(Boolean)`
      </td>

      <td>
        Control of playback functionality managed in Player configuration (Autostart)
      </td>
    </tr>

    <tr>
      <td>
        `setQuality(String)`
      </td>

      <td>
        `setQuality(wantedQuality: String)`
      </td>
    </tr>

    <tr>
      <td>
        `setSubtitle(String)`
      </td>

      <td>
        `setSubtitles(wantedSubtitle: String)`
      </td>
    </tr>

    <tr>
      <td>
        `setVolume(float)`
      </td>

      <td>
        `setVolume(volume: Double)` — value from `0.0` to `1.0`
      </td>
    </tr>

    <tr>
      <td>
        `release()`
      </td>

      <td>
        `destroy()`
      </td>
    </tr>

    <tr>
      <td>
        `setIsWebContentDebuggingEnabled()`
      </td>

      <td>
        Error tracking available with `setLogLevel(LogLevel.String)`
      </td>
    </tr>

    <tr>
      <td>
        `setMinimizeProgress(float)`
      </td>

      <td>
        No longer supported with latest Player UI design
      </td>
    </tr>

    <tr>
      <td>
        `setWebViewErrorListener(WebViewErrorListener)`
      </td>

      <td>
        Use `PlayerSetupListener.onPlayerSetupFailed()` and `PlayerListener.onPlayerError()`
      </td>
    </tr>

    <tr>
      <td>
        `showControls()`
      </td>

      <td>
        No longer supported. Ad and playback controls are now managed in Player configuration.
      </td>
    </tr>

    <tr>
      <td>
        `toggleControls()`
      </td>

      <td>
        No longer supported. Ad and playback controls are now managed in Player configuration.
      </td>
    </tr>

    <tr>
      <td>
        `togglePlay()`
      </td>

      <td>
        Use `play()` or `pause()`
      </td>
    </tr>

    <tr>
      <td>
        `getBufferedTime()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>

    <tr>
      <td>
        `getVideoPaused()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>

    <tr>
      <td>
        `getVolume()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>

    <tr>
      <td>
        `isEnded()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>

    <tr>
      <td>
        `isSeeking()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>

    <tr>
      <td>
        `getDuration()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>

    <tr>
      <td>
        `getPosition()`
      </td>

      <td>
        Property available from Player state: `getState(callback: PlayerStateCallback)`
      </td>
    </tr>
  </tbody>
</Table>

Find the [complete list of methods for the new Android SDK](https://developers.dailymotion.com/v2/reference/android-sdk-player-methods).

<br />

## Events

| Description                                                                                                     | Legacy events                    | New events              |
| :-------------------------------------------------------------------------------------------------------------- | :------------------------------- | :---------------------- |
| Sent when the Player is ready to accept API commands. Do not try to call functions before receiving this event. | `ApiReadyEvent`                  | `onPlayerSetupSuccess`  |
| Sent the first time the Player attempts to start the playback.                                                  | `StartEvent`                     | `onPlayerStart`         |
| Sent when a new video has been loaded in the Player.                                                            | `VideoChangeEvent`               | `onPlayerVideoChange`   |
| Sent when the Player starts to play an ad media resource.                                                       | `AdStartEvent`                   | `onAdstart`             |
| Sent when the playback position of an ad changes.                                                               | `AdTimeUpdateEvent`              | `onAdTimeChange`        |
| Sent when the Player starts the playback of an ad.                                                              | `AdPlayEvent`                    | `onAdPlay`              |
| Sent when the Player pauses an ad resource.                                                                     | `AdPauseEvent`                   | `onAdPause`             |
| Sent when the Player reaches the end of an ad media resource.                                                   | `AdEndEvent`                     | `onAdPause`             |
| Sent when the Player starts to play the media resource.                                                         | `VideoStartEvent`                | `onVideoStart`          |
| Sent when the playback position changes.                                                                        | `TimeUpdateEvent`                | `onVideoTimeChange`     |
| Sent when the Player is starting to seek to another position in the video.                                      | `SeekingEvent`                   | `onVideoSeekStart`      |
| Sent when the Player has completed a seeking operation.                                                         | `SeekedEvent`                    | `onVideoSeekStart`      |
| Sent when the browser is fetching the media data.                                                               | `ProgressEvent`                  | `onVideoProgress`       |
| Sent when the duration property of the video becomes available or changes after a new video load.               | `DurationChangeEvent`            | `onVideoDurationChange` |
| Sent when the content media resource playback has started.                                                      | `PlayingEvent`                   | `onVideoPlaying`        |
| Sent when the content media resource playback has paused.                                                       | `PauseEvent`                     | `onVideoPause`          |
| Sent when the Player reaches the end of the content media resource.                                             | `VideoEndEvent`                  | `onVideoEnd`            |
| Sent when playback starts after the play method returns.                                                        | `PlaybackReadyEvent`             | `onVideoPlay`           |
| Sent when qualities are available.                                                                              | `QualitiesAvailableEvent`        | `onVideoQualitiesReady` |
| Sent when the video quality changes.                                                                            | `QualityChangeEvent`             | `onVideoQualityChange`  |
| Sent when the volume or mute state changes.                                                                     | `VolumeChangeEvent`              | `onPlayerVolumeChange`  |
| Sent when the fullscreen mode is requested.                                                                     | `FullScreenToggleRequestedEvent` | `onFullscreenRequested` |

Find the [complete list of events for the new Android SDK](https://developers.dailymotion.com/v2/reference/android-sdk-player-events).

<br />

## Player state and properties

* **Legacy SDK**

The legacy SDK provided limited access to Player properties: it required specific events to be triggered to be able to retrieve associated Player properties.

```kotlin
dailyMotionVideoPlayer.setEventListener { event ->
    when (event) {
        is ApiReadyEvent -> ...
        is StartEvent -> ...
        is ProgressEvent -> ...
        is DurationChangeEvent -> ...
        /* And many more event */
        else -> {/* In case a POJO is not available you can directly access the raw data */
            if (event.name == "_generic_") {/* Do some stuff for my event: parse the raw date to extract the event name or values */
                Log.d("Event with payload: ${event.payload}")
            }
        }
    }
}
```

<br />

* **New SDK**

The new Android SDK provides **more data with easier access**: any value within the Player state can be retrieved at any time using the method `getState(callback: PlayerStateCallback)`, without having to rely on specific events.

To retrieve the Player state, simply pass an object implementing `PlayerView.PlayerStateCallback` to `PlayerView#queryPlayerState(...)` method.

```
playerView.queryPlayerState(object: PlayerView.PlayerStateCallback {
    fun onPlayerStateReceived(playerView: PlayerView, playerState: PlayerEvent.PlayerState)
        // Use playerState
    }
)
```

See [full list of available state properties](https://developers.dailymotion.com/v2/reference/android-sdk-player-states).

<br />

<Callout icon="📘" theme="info">
  ### If you need assistance with the migration:

  Please reach out to your dedicated Dailymotion Account Manager or our [Support team](https://faq.dailymotion.com/hc/requests/new)
</Callout>