Interface AdContainer
-
- All Implemented Interfaces:
public interface AdContainerInterface for ad markup containers. An ad container loads ad markup and instruments it for emitting beacons and responding to requests from the creative. Additionally, a container defines the following * A data model that the ad markup may be transformed into to enable easy manipulation of the markup * A renderer that inflates the data model - indirectly, the markup - into a view Containers may load markup of different types; however, a given container can only load a specific type of markup. Legacy RenderViews, for example, load HTML ad markup.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAdContainer.Companionpublic interfaceAdContainer.AdScreenEventsListenerInterface to be notified of ad screen events for expandable and full-screen ads.
Note** This event listener is not used for in-app browser.
public @interfaceAdContainer.EventTypepublic @interfaceAdContainer.PlacementType
-
Method Summary
Modifier and Type Method Description abstract UnitdisableHardwareAcceleration()Disable hardware acceleration on the underlying views. abstract UnitsetExitAnimation(Integer exitAnimationResourceId)Set the exit animation resource for fullscreen placements. abstract UnitsetFullScreenActivityContext(Activity activity)Set the View Controller used to display fullscreen ads. abstract UnitsetReferenceContainer(AdContainer container)Method to set the reference container. abstract UnitdismissCurrentViewContainer()Close the fullscreen ad. abstract UnitdestroyContainer()Destroy this ad container, preventing it from future use. abstract UnitinflateVideoPlayer(ViewGroup adBackgroundView)Inflate video player view inside the provided ad background view. abstract UnitfireEvent(Byte type, Map<String, String> macroSubs)Implement event injection by this container abstract BytegetPlacementType()abstract ObjectgetDataModel()abstract ViewgetVideoContainerView()abstract AdContainergetReferenceContainer()abstract AdContainer.AdScreenEventsListenergetFullScreenEventsListener()abstract BooleanisDestroyed()abstract ViewableAdgetViewableAd()abstract StringgetMarkupType()The type of markup that this container loads abstract AdConfiggetAdConfig()Method to get the adConfig. abstract ContextgetContainerContext()abstract TelemetryOnAdImpressiongetTelemetryOnAdImpression()Method to get impression telemetry. abstract Map<String, AdUnitTelemetryHelper>getTelemetryManagerMap()Method to get impression telemetry. abstract UnitsetTelemetryManagerMap(Map<String, AdUnitTelemetryHelper> telemetryManagerMap)Method to get impression telemetry. abstract StringgetImpressionId()abstract StringgetCreativeId()abstract StringgetAdType()abstract UnitsetAdType(String adType)abstract Map<View, FriendlyObstructionPurpose>getFriendlyViews()Friendly Views for AdView for Impression and Viewability tracking abstract UnitsetFriendlyViews(Map<View, FriendlyObstructionPurpose> friendlyViews)Friendly Views for AdView for Impression and Viewability tracking -
-
Method Detail
-
disableHardwareAcceleration
abstract Unit disableHardwareAcceleration()
Disable hardware acceleration on the underlying views.
-
setExitAnimation
abstract Unit setExitAnimation(Integer exitAnimationResourceId)
Set the exit animation resource for fullscreen placements.
-
setFullScreenActivityContext
abstract Unit setFullScreenActivityContext(Activity activity)
Set the View Controller used to display fullscreen ads.
-
setReferenceContainer
abstract Unit setReferenceContainer(AdContainer container)
Method to set the reference container.
- Parameters:
container- Reference container to be set.
-
dismissCurrentViewContainer
abstract Unit dismissCurrentViewContainer()
Close the fullscreen ad.
-
destroyContainer
abstract Unit destroyContainer()
Destroy this ad container, preventing it from future use.
-
inflateVideoPlayer
abstract Unit inflateVideoPlayer(ViewGroup adBackgroundView)
Inflate video player view inside the provided ad background view.
- Parameters:
adBackgroundView- The background view where video player has to be inflated.
-
fireEvent
abstract Unit fireEvent(Byte type, Map<String, String> macroSubs)
Implement event injection by this container
- Parameters:
type- an @EventType bytemacroSubs- any macros that must be replaced while injecting the event.
-
getPlacementType
abstract Byte getPlacementType()
- Returns:
the
PlacementTypebacking this container.
-
getDataModel
abstract Object getDataModel()
- Returns:
the data model for this container.
-
getVideoContainerView
abstract View getVideoContainerView()
-
getReferenceContainer
abstract AdContainer getReferenceContainer()
-
getFullScreenEventsListener
abstract AdContainer.AdScreenEventsListener getFullScreenEventsListener()
- Returns:
implementation of the AdScreenEventsListener interface.
-
isDestroyed
abstract Boolean isDestroyed()
- Returns:
trueif this container is destroyed
-
getViewableAd
abstract ViewableAd getViewableAd()
- Returns:
the inflated viewableAd;
nullif no viewableAd was created.
-
getMarkupType
abstract String getMarkupType()
The type of markup that this container loads
- Returns:
one of the MarkupType enumerations.
-
getAdConfig
abstract AdConfig getAdConfig()
Method to get the adConfig.
- Returns:
the current adConfig.
-
getContainerContext
abstract Context getContainerContext()
-
getTelemetryOnAdImpression
abstract TelemetryOnAdImpression getTelemetryOnAdImpression()
Method to get impression telemetry.
- Returns:
TelemetryOnAdImpression.
-
getTelemetryManagerMap
abstract Map<String, AdUnitTelemetryHelper> getTelemetryManagerMap()
Method to get impression telemetry.
- Returns:
TelemetryManagerMap.
-
setTelemetryManagerMap
abstract Unit setTelemetryManagerMap(Map<String, AdUnitTelemetryHelper> telemetryManagerMap)
Method to get impression telemetry.
- Returns:
TelemetryManagerMap.
-
getImpressionId
abstract String getImpressionId()
-
getCreativeId
abstract String getCreativeId()
-
getFriendlyViews
abstract Map<View, FriendlyObstructionPurpose> getFriendlyViews()
Friendly Views for AdView for Impression and Viewability tracking
-
setFriendlyViews
abstract Unit setFriendlyViews(Map<View, FriendlyObstructionPurpose> friendlyViews)
Friendly Views for AdView for Impression and Viewability tracking
-
-
-
-