Android / AndroidTV SDK
The following tutorials show you how to integrate, configure and customize your Bitmovin Player on Android.
This Quick Start Video will walk you the initial steps to run the Android SDK Example Repository using Google Android Studio! In no time you will get started with Player & Analytics, for which you'll need the code snippet below!


The following steps will walk you through adding the SDK to an new or existing Android Project step by step. If you don't know yet how to start such a project, please visit this Android Developer Guide first, or try the Quick Start Guide above first :)
Add a Link to the Player SDK to the Project
Add a link to our release repository to your application's build.gradle
file. In addition to that, the google maven repository must be added.

Add the Dependency to the Project
Add the Bitmovin Player Android SDK as a dependency to your project as shown below, while replacing {version-number}
with the desired SDK version number. The available SDK versions are listed in our maven repository.

Edit Manifest
The Bitmovin Player license key and the necessary permissions have to be added to the manifest file. The license key should be added inside the application
element.

Alternatively, you can specify the license key in the PlayerConfig
.

The player requires the INTERNET
permission. The following line should be added inside the manifest
element.

Instantiate the Player (quick setup)
To get started quickly with the default Bitmovin Web UI, the PlayerView
can be added to the layout:

Then you need to create the source.

The last step is to get the player instance in the Activity
and load the source into it:

Instantiate the Player (advanced setup)
For more elaborate work flows like specific configurations or a custom UI, the player can be created explicitly as such:

This player can then be attached to a PlayerView
:

Alternatively, a custom UI can be implemented. See the corresponding sample for details.
Finally, a source is created and loaded into the player.

Allowlist Application ID
In order to use the player in your app you have to allowlist the application ID (package name) of your app. This is a security mechanism and protects your license from being used elsewhere.
Application ID allowlisting can be done in the dashboard under Player -> Licenses.
In this tutorial you learned how to add the Bitmovin Player Android SDK to your project, set up the player license, use the player and how to configure it.
Now you can start having a look at the API reference and adapt the player to your needs.
You can find many more fully functional code examples in our Github Repository.