Setup advertising with Google IMA

Since IMA is a third-party SDK and not shipped as part of the Bitmovin Player, you must first add the necessary dependencies to the project's build.gradle.kts or build.gradle file:

dependencies {
    implementation("com.google.ads.interactivemedia.v3:interactivemedia:3.29.0")
    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
}
dependencies {
    implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.29.0'
    implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
}

Further add your Ad Manager app ID (identified in the Ad Manager UI) to your app's AndroidManifest.xml file. To do so, add a <meta-data> tag with android:name="com.google.android.gms.ads.APPLICATION_ID".

See also the Quick Start Guide from Google.

<manifest>
    <application>
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
	      <meta-data
            android:name="com.google.android.gms.ads.AD_MANAGER_APP"
            android:value="true" />
    </application>
</manifest>

Where to go from here?

By adding the dependencies the IMA integration is enabled in the Bitmovin Android Player and can be used with the AdSourceType.Ima. You can follow Setting up Ads with the Android SDK to schedule and play back your first ad.