---
updatedAt: 2026-06-12T07:17:41.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/playback/llms.txt
---

# ImaConfig

com.bitmovin.player.api.advertising.ima

# ImaConfig

data class ImaConfig(val onAdsManagerAvailable: [AdsManagerAvailableCallback](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ads-manager-available-callback)? = null, val beforeInitialization: [BeforeInitializationCallback](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-before-initialization-callback)? = null, val preferredUiElements: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)<[ImaUiElement](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ima-ima-ui-element)>? = null, val preferredUiType: [ImaUiType](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ima-ima-ui-type) = ImaUiType.Ima) : [Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html)

Contains configuration options to customize behavior for Google IMA SDK.

## Constructors

|           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ImaConfig | constructor(onAdsManagerAvailable: [AdsManagerAvailableCallback](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ads-manager-available-callback)? = null, beforeInitialization: [BeforeInitializationCallback](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-before-initialization-callback)? = null, preferredUiElements: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)<[ImaUiElement](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ima-ima-ui-element)>? = null, preferredUiType: [ImaUiType](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ima-ima-ui-type) = ImaUiType.Ima) |

## Types

| Name    | Summary       |
| ------- | ------------- |
| Builder | class Builder |

## Properties

| Name                  | Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| beforeInitialization  | val beforeInitialization: [BeforeInitializationCallback](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-before-initialization-callback)?<br>Callback that provides access to the IMA ImaSdkSettings before any initialization happens.                                                                                                                                                                                                                                                                                                                   |
| onAdsManagerAvailable | val onAdsManagerAvailable: [AdsManagerAvailableCallback](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ads-manager-available-callback)?<br>Callback that provides access to the IMA AdsManager when it gets available.                                                                                                                                                                                                                                                                                                                                  |
| preferredUiElements   | val preferredUiElements: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)<[ImaUiElement](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ima-ima-ui-element)>?<br>A list of preferred UI elements that should be displayed when an ad is active. Depending on the ad, this preference might be ignored, in that case a warning ([com.bitmovin.player.api.deficiency.PlayerWarningCode.ApplyingImaUiElementPreferenceFailed](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-deficiency-player-warning-code)) is emitted. |
| preferredUiType       | val preferredUiType: [ImaUiType](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-advertising-ima-ima-ui-type)<br>The preferred UI type for IMA ads. Depending on the ad, this preference might be ignored, in that case a warning ([com.bitmovin.player.api.deficiency.PlayerWarningCode.DisablingImaUiFailed](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-deficiency-player-warning-code)) is emitted.                                                                                                                                                                   |