AdLoader

class AdLoader

Use AdLoader to display multiple ads with one load, such as displaying carousel ads.
AdLoader consists of a Builder pattern, so need to declare the AdLoader$Builder class and add some parameters to load ads.
Add AdView to draw with the Builder, and sets AdLoaderStateListener to detect the loading status of AdLoader as needed.
Generates AdLoader with build method after added parameters to the Builder, AdLoader starts loading ads that uses execute method.
When loading starts, the loaded AdView will be drawn in sequence. At this time, the drawing order cannot be controlled.
Also, when loading ads with AdLoader, you don't need to implement deduplication with RunaAdSession, because this includes deduplication functionality.

-> Sample Code

Since

1.3.0

Types

Link copied to clipboard
class Builder(context: Context)

The Builder to build an AdLoader.

Functions

Link copied to clipboard
fun execute()

Execute ads loading.
The data of the loaded advertisement will be apply in the added each AdViews.

Link copied to clipboard
fun getAdViews(): List<AdView>

Returns a List of the added AdViews.

Link copied to clipboard
fun getValidAdViews(): List<AdView>?

Returns a list of loaded and valid AdViews only. This array does not contain AdViews that have loaded invalid data(Unfilled etc). Loads are performed asynchronously, so the return is null until all loads are complete.

Link copied to clipboard
fun isLoading(): Boolean

Whether AdLoader is loading ads.