PreloadConfiguration.Builder

class PreloadConfiguration.Builder


Builder class for PreloadConfiguration.

Summary

Public constructors

Builder(adUnitId: String!)

Creates a new builder for PreloadConfiguration.

Builder(adUnitId: String!, adFormat: AdFormat!)

This function is deprecated.

Use Builder instead.

Public functions

PreloadConfiguration!

Builds the PreloadConfiguration.

PreloadConfiguration.Builder!

Sets the ad request to use to preload ads.

PreloadConfiguration.Builder!

Sets the preload buffer size.

Public constructors

Builder

Builder(adUnitId: String!)

Creates a new builder for PreloadConfiguration.

Parameters
adUnitId: String!

The ad unit ID to use to preload ads.

Builder

Builder(adUnitId: String!, adFormat: AdFormat!)

Creates a new builder for PreloadConfiguration.

Parameters
adUnitId: String!

The ad unit ID to use to preload ads.

adFormat: AdFormat!

The ad format to use to preload ads.

Public functions

build

fun build(): PreloadConfiguration!

Builds the PreloadConfiguration.

setAdRequest

@CanIgnoreReturnValue
fun setAdRequest(adRequest: AdRequest!): PreloadConfiguration.Builder!

Sets the ad request to use to preload ads.

setBufferSize

@CanIgnoreReturnValue
fun setBufferSize(bufferSize: Int): PreloadConfiguration.Builder!

Sets the preload buffer size.

The buffer size is capped at 15. Defaults to a Google-optimized buffer size if a non-positive number is set.