[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Tue Feb 04 2020

Migration Guide for API changes in Android player SDK v2.38.0

Tue Feb 04 2020

OverviewLink Icon

The following steps are required to be able to update to v2.38.0 or higher from your current version of the Bitmovin Android Player SDK.

1) Migrate to Android X Support Libraries (required)Link Icon

If you are already using an earlier version of the Bitmovin Android Player SDK, you will have to replace its current set of libraries with the according Android X libraries.

Android Studio provides a way to do that automatically. Go to the Refactor menu and select Migrate to Android X, and click Migrate. A ZIP archive will be created with the current state of your project, afterwards the migration will be executed.

Migrate to Android X

2) Update your BitmovinDownloadService ExtensionsLink Icon

If you are using the BitmovinDownloadService in your application and you extended it (e.g. customized notifications for offline playback), please continue reading :)

The onTaskStateChanged method signature changed. It has a different Argument now. Instead of a TaskState, the SDK user gets passed a BitmovinDownloadState, which has a different structure than before. It already contains the OfflineContent object, which previously had to be parsed from DownloadAction.data.

BitmovinDownloadState:

1class BitmovinDownloadState(
2 val offlineContent: OfflineContent,
3 val trackIdentifier: String,
4 val state: OfflineOptionEntryState,
5 val downloadedPercentage: Float,
6 val downloadedBytes: Long
7)

TaskState:

1class TaskState (
2 val taskId: Int,
3 val action: DownloadAction,
4 val state: Int,
5 val downloadPercentage: Float,
6 val downloadedBytes: Long,
7 val error: Throwable
8)

DownloadAction:

1class DownloadAction (
2 val type: String,
3 val version: Int,
4 val uri: Uri,
5 val isRemoveAction: Boolean,
6 val data: Array<Byte>
7)

Give us feedback