Infeed Banner
Integrate Infeed Banners
Last updated
Integrate Infeed Banners
Last updated
Infeed banner placements are designed to serve ads in scrollable feeds (nevertheless, they can also be used in all other scenarios). This includes giving the app complete control over the lifecycle of a specific banner impression. The app can load an ad with a specific configuration and gets notified about the outcome of that specific load request (successful, failure). Hence, the usage of an infeed banner differs from using sticky banners.
To create an instance of , use the following API:
can be configured with the number of workers and whether manual ad space counting is enabled.
Manual ad space counting (Please refer to our article about .)
false
(default): infeed banner placement counts an Ad Space every time the app requests an ad from it. Shall only be used, if the app is presenting banners immediately (= not caching them for later use).
true
: the app needs to notify the infeed banner placement about every Ad Space it creates (= placement doesn’t count Ad Spaces itself). This is especially useful if the app implements its own banner caching (e.g. in order to create a smooth user experience for the feed). In this case, the app should notify the placement about an Ad Space only if the feed cell intended for presenting a banner is reaching the visible area of the screen (regardless of whether an ad was available for it or not). If this sounds interesting to you, we strongly advise visiting our chapter about AATKit’s .
To manually count an ad space, call the following InfeedBannerPlacement
API:
Number of workers
Default: 3
Defines, how many ads can be loaded in parallel. Higher numbers will result in faster ad delivery but also in more CPU and network traffic consumption
The banner request can be configured with:
Targeting Information.
Content-targeting URL.
There might be pending ad requests when the user navigates to a different activity. You should cancel any pending requests when that happens.
When you no longer need a banner, you have to destroy it manually by removing it from your view and calling the "destroy" method:
After loading a banner view, you can access the loaded ad information by accessing the adInfo
property of the loaded banner view:
Through the use of , you can listen to the different placement callbacks.
The infeed banner placement uses the request completion listener () to notify about successful ad load or failure. To request a banner, use the default initializer that takes an instance implementing as a parameter.
A set of banner sizes of type .