AdManagerAdRequest.Builder

public final class AdManagerAdRequest.Builder extends AbstractAdRequestBuilder


Builds an AdManagerAdRequest.

Summary

Public constructors

Constructs a AdManagerAdRequest.Builder.

Public methods

AdManagerAdRequest.Builder

Sets a slot-level ad category exclusion label.

AdManagerAdRequest

Constructs an AdManagerAdRequest with the specified attributes.

AdManagerAdRequest.Builder

Returns the self instance of a specified subtype.

AdManagerAdRequest.Builder

Sets an identifier for use in frequency capping, audience segmentation and targeting, sequential ad rotation, and other audience-based ad delivery controls across devices.

Inherited methods

From com.google.android.gms.ads.AbstractAdRequestBuilder
T
@CanIgnoreReturnValue
addCustomEventExtrasBundle(
    Class<CustomEvent> adapterClass,
    Bundle customEventExtras
)

This method is deprecated.

Use addNetworkExtrasBundle instead.

T

Adds a custom targeting parameter.

T

Adds a custom targeting parameter with multiple values.

T

Adds a keyword for targeting purposes.

T
@CanIgnoreReturnValue
addNetworkExtrasBundle(
    Class<MediationExtrasReceiver> adapterClass,
    Bundle networkExtras
)

Adds extra parameters to pass to a specific ad network adapter.

T

Sets an ad string that represents an ad response.

T

Sets the content URL for a web site whose content matches the app's primary content.

T

Sets a custom timeout for HTTPS calls made by the Google Mobile Ads SDK during an ad request.

T

Sets URLs representing web content near an ad.

T

Sets the request agent string to identify the ad request's origin.

Public constructors

Builder

public Builder()

Constructs a AdManagerAdRequest.Builder.

Public methods

addCategoryExclusion

@CanIgnoreReturnValue
public AdManagerAdRequest.Builder addCategoryExclusion(String categoryExclusion)

Sets a slot-level ad category exclusion label.

build

public AdManagerAdRequest build()

Constructs an AdManagerAdRequest with the specified attributes.

self

public AdManagerAdRequest.Builder self()

Returns the self instance of a specified subtype.

setPublisherProvidedId

@CanIgnoreReturnValue
public AdManagerAdRequest.Builder setPublisherProvidedId(String publisherProvidedId)

Sets an identifier for use in frequency capping, audience segmentation and targeting, sequential ad rotation, and other audience-based ad delivery controls across devices.