Interface GoogleImaIntegration
-
- All Implemented Interfaces:
-
com.theoplayer.android.api.Integration
public interface GoogleImaIntegration implements Integration
The Google IMA Integration API.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
setAdsRenderingSettings(AdsRenderingSettings adsRenderingSettings)
Sets the ads rendering settings which will be used when requesting an ad. abstract AdsRenderingSettings
getAdsRenderingSettings()
The ads rendering settings which will be used when requesting an ad. abstract Unit
requestAds(AdsRequest adsRequest, AdsRenderingSettings adsRenderingSettings)
Requests a Google IMA ad with the provided AdsRequest and AdsRenderingSettings. abstract Unit
schedule(GoogleImaAdDescription googleImaAdDescription)
Schedules a GoogleImaAdDescription. abstract Unit
focus()
Moves the focus on the skip button if present. -
-
Method Detail
-
setAdsRenderingSettings
abstract Unit setAdsRenderingSettings(AdsRenderingSettings adsRenderingSettings)
Sets the ads rendering settings which will be used when requesting an ad.
- Parameters:
adsRenderingSettings
- The AdsRenderingSettings (Nullable).
-
getAdsRenderingSettings
abstract AdsRenderingSettings getAdsRenderingSettings()
The ads rendering settings which will be used when requesting an ad.
- Returns:
The AdsRenderingSettings (Nullable).
-
requestAds
abstract Unit requestAds(AdsRequest adsRequest, AdsRenderingSettings adsRenderingSettings)
Requests a Google IMA ad with the provided AdsRequest and AdsRenderingSettings.
Will not override the AdsRenderingSettings set from setAdsRenderingSettings.
If AdsRenderingSettings is passed, it will be used to request the Google IMA ad.
If AdsRenderingSettings is null, the AdsRenderingSettings from setAdsRenderingSettings will be used.
- Parameters:
adsRequest
- The AdsRequest to be used to request the Google IMA ad (NonNull).adsRenderingSettings
- The AdsRenderingSettings to be used to request the Google IMA ad (Nullable).
-
schedule
abstract Unit schedule(GoogleImaAdDescription googleImaAdDescription)
Schedules a GoogleImaAdDescription. It will be added on top of the already existing ads.
Alternatively, if you want to replace the ads with new ones or set ads while setting up the player, you should set a SourceDescription with a GoogleImaAdDescription.
This function will have no effect if an invalid AdDescription is provided.
- Parameters:
googleImaAdDescription
- The ad to schedule (Nullable).
-
-
-
-