AdapterInitializationConfig.Builder

@ExperimentalApi
public final class AdapterInitializationConfig.Builder


Summary

Public constructors

Public methods

final @NonNull AdapterInitializationConfig
final @NonNull AdapterInitializationConfig.Builder

Sets the ad formats for which the SDK will initialize adapters.

final @NonNull AdapterInitializationConfig.Builder

Sets the ad units for which the SDK will initialize adapters.

final @NonNull AdapterInitializationConfig.Builder

Sets the specific adapter classes that will be initialized.

final @NonNull AdapterInitializationConfig.Builder

Sets the specific adapter classes that will not be initialized.

final @NonNull AdapterInitializationConfig.Builder

Sets the amount of time that the SDK will wait for the requested set of adapters to initialize before invoking OnAdapterInitializationCompleteListener.

final @NonNull AdapterInitializationConfig.Builder

Java variant of setInitializationTimeout.

Public constructors

Builder

public Builder()

Public methods

build

public final @NonNull AdapterInitializationConfig build()

setAllowedAdFormats

public final @NonNull AdapterInitializationConfig.Builder setAllowedAdFormats(@NonNull Set<@NonNull AdFormat> formats)

Sets the ad formats for which the SDK will initialize adapters.

Note: An adapter will have to be associated with both one of the allowed ad formats AND one of the allowed ad units, if both are specified.

setAllowedAdUnitIds

public final @NonNull AdapterInitializationConfig.Builder setAllowedAdUnitIds(@NonNull Set<@NonNull String> adUnitIds)

Sets the ad units for which the SDK will initialize adapters.

Note: An adapter will have to be associated with both one of the allowed ad formats AND one of the allowed ad units, if both are specified.

setAllowedAdapterClasses

public final @NonNull AdapterInitializationConfig.Builder setAllowedAdapterClasses(@NonNull Set<@NonNull String> adapterClasses)

Sets the specific adapter classes that will be initialized.

An adapter in this set will always be initialized, regardless of ad unit and format settings, unless it is present in setExcludedAdapterClasses.

setExcludedAdapterClasses

public final @NonNull AdapterInitializationConfig.Builder setExcludedAdapterClasses(@NonNull Set<@NonNull String> adapterClasses)

Sets the specific adapter classes that will not be initialized.

An adapter in this set will never be initialized, regardless of calls to setAllowedAdFormats, setAllowedAdUnitIds, or setAllowedAdapterClasses.

setInitializationTimeout

public final @NonNull AdapterInitializationConfig.Builder setInitializationTimeout(@NonNull Duration timeout)

Sets the amount of time that the SDK will wait for the requested set of adapters to initialize before invoking OnAdapterInitializationCompleteListener.

This time includes the amount of time that it takes to fetch your mediation configuration from Google's servers, if one is not cached already, but does not include the time it takes for the SDK to minimally get ready and start processing adapter initialization.

setInitializationTimeoutMs

public final @NonNull AdapterInitializationConfig.Builder setInitializationTimeoutMs(long timeout)

Java variant of setInitializationTimeout.