{% setvar book_path %}/admob/android/_book.yaml{% endsetvar %} {% include "/admob/android/reference/_dackka-meta-tags.html" %}

AdRequest.Builder

{% setvar page_path %}com/google/android/gms/ads/AdRequest.Builder.html{% endsetvar %} {% setvar doc_root_path %}/admob/android/reference{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "android/_kotlin_switcher2.md" %}

class AdRequest.Builder : AbstractAdRequestBuilder

kotlin.Any
   ↳ com.google.android.gms.ads.AbstractAdRequestBuilder
     ↳ com.google.android.gms.ads.AdRequest.Builder

Builds an AdRequest.

Summary

Public constructors

Constructs a Builder.

Public functions

AdRequest!

Constructs an AdRequest with the specified attributes.

AdRequest.Builder!

Returns the self instance of a specified subtype.

Inherited functions

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

This function 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(
    adapterClass: Class<MediationExtrasReceiver!>!,
    networkExtras: Bundle!
)

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!
@CanIgnoreReturnValue
setNeighboringContentUrls(
    neighboringContentUrls: (Mutable)List<String!>!
)

Sets URLs representing web content near an ad.

T!

Sets a default placement ID for the loaded ad.

T!

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

Public constructors

Builder

Builder()

Constructs a Builder.

Public functions

build

fun build(): AdRequest!

Constructs an AdRequest with the specified attributes.

self

fun self(): AdRequest.Builder!

Returns the self instance of a specified subtype.