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.
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.
If you are using the
BitmovinDownloadService in your application and you extended it (e.g. customized notifications for offline playback), please continue reading :)
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
1class BitmovinDownloadState(2 val offlineContent: OfflineContent,3 val trackIdentifier: String,4 val state: OfflineOptionEntryState,5 val downloadedPercentage: Float,6 val downloadedBytes: Long7)
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: Throwable8)
1class DownloadAction (2 val type: String,3 val version: Int,4 val uri: Uri,5 val isRemoveAction: Boolean,6 val data: Array<Byte>7)