Skip to main content
Version: 6.13.0

Android Feature Integrations

Modularization

The Android THEOplayer SDK uses modularized features, which means there is a base SDK that can handle basic playback and additional feature integrations are provided as separate modules that can be added as desired. This approach gives more flexibility and results in a reduced application size, since non-required parts are not included in the build of the application.

For example, the base SDK is provided by:

implementation 'com.theoplayer.theoplayer-sdk-android:core:+'

Meanwhile, additional features such as Google IMA and Google Cast are provided by:

implementation 'com.theoplayer.theoplayer-sdk-android:integration-ads-ima:+'
implementation 'com.theoplayer.theoplayer-sdk-android:integration-cast:+'

Importing additional integration modules

As shown in the previous section, importing additional integration modules can be done by simply adding the dependency in the build.gradle file of the module using THEOplayer.

Important Note: It is required to keep the Android base SDK and all the required feature modules on the same version number. For example one should not import core:3.6.0 and integration-cast:3.5.0 in the same project.

Adding integrations

After importing the dependencies, it's time to create the integrations and connect them to THEOplayer.

Each module provides a Factory class that allows the creation of that specific integration. For example, the Google IMA module provides GoogleImaIntegrationFactory and the Google Cast module provides CastIntegrationFactory.

Additionally, the Player class provides the addIntegration(Integration integration) API which allows adding the integration to the player.

Connecting the feature integration with the Player will make them available to be used. Otherwise, calling an API from an integration without adding it to the Player will cause an error to be thrown.

Available feature integrations

With Android THEOplayer SDK we currently support the following feature integrations:

FeatureDependencyReleaseDocumentation
Google IMAintegration-ads-ima:+3.1.0+Google IMA Documentation
Chromecastintegration-cast:+3.4.0+Chromecast Documentation
AWS MediaTailorintegration-ads-mediatailor:+4.0.0+AWS MediaTailor Documentation
Google DAIintegration-ads-dai:+4.3.0+Google DAI Documentation