Builder for a AdLoader.
|
Builder(Context
context, String adUnitID)
Creates a new
AdLoader.Builder
for constructing an AdLoader.
|
| AdLoader | |
| AdLoader.Builder |
forAdManagerAdView(OnAdManagerAdViewLoadedListener
listener, AdSize...
adSizes)
Registers a listener to handle loading a Google Ad Manager banner ad.
|
| AdLoader.Builder |
forCustomFormatAd(String
customFormatId,
NativeCustomFormatAd.OnCustomFormatAdLoadedListener adLoadedListener,
NativeCustomFormatAd.OnCustomClickListener customClickListener)
Enables the
AdLoader to load custom format ads.
|
| AdLoader.Builder |
forNativeAd(NativeAd.OnNativeAdLoadedListener
listener)
Registers a listener to handle loading a
NativeAd.
|
| AdLoader.Builder |
withAdListener(AdListener
listener)
|
| AdLoader.Builder |
withAdManagerAdViewOptions(AdManagerAdViewOptions
options)
Sets options to use for loading a Google Ad Manager ad view.
|
| AdLoader.Builder |
Creates a new AdLoader.Builder
for constructing an AdLoader.
| context | The context. |
|---|---|
| adUnitID | The ad unit ID. |
Registers a listener to handle loading a Google Ad Manager banner ad.
| listener | The callback that will run when a banner ad loads. |
|---|---|
| adSizes | Sets the supported sizes of the banner ad. |
| IllegalArgumentException | If adSizes is null or empty. |
|---|
Enables the AdLoader to load custom format ads.
| customFormatId | Custom format ID defined in the Ad Manager UI. |
|---|---|
| adLoadedListener | A listener to be called when a NativeCustomFormatAd
loads. |
| customClickListener | An optional listener to define custom click logic for ad clicks. When set, this overrides the ad's default click through behavior of navigating to the click URL defined in the Ad Manager UI. |
| listener | An object that handles errors encountered when retrieving native ads. |
|---|
Sets options to use for loading a Google Ad Manager ad view.
| options | Google Ad Manager banner ad options. |
|---|
Sets the native ad options to the ad loader builder.
| options | An object that specifies various native ad options. |
|---|