SdkConfiguration.Builder /5.0.0

public static class SdkConfiguration.Builder

A Builder used to configure the initialization of the MoPub SDK. Refer to our initialization directions for additional usage instructions.

Public Methods

public SdkConfiguration /build() /+5.0.0

  • Description: Builds the SdkConfiguration.Builder used by the MoPub initialization. Returns the builder.

  • Parameters: None.

public SdkConfiguration.Builder /withAdditionalNetwork(String adapterConfigurationClass) /+5.5.0

  • Description: Specifies an additional custom adapter configuration to attempt to initialize. MoPub automatically adds MoPub-supported networks’ adapter configurations. Returns the builder.

  • Parameters:

    • adapterConfigurationClass: Class.getName() of an adapter configuration class. This should not be the simple name or the canonical name.

public SdkConfiguration.Builder /withLegitimateInterestAllowed(boolean legitimateInterestAllowed) /+5.5.0

  • Description: Sets whether or not legitimate interest is allowed for the collection of personally identifiable information. This API can be used if you want to allow supported SDK networks to collect user information on the basis of legitimate interest. Returns the builder.

  • Parameters:

    • legitimateInterestAllowed: Pass in true if legitimate interest is allowed; false otherwise.

public SdkConfiguration.Builder /withLogLevel(LogLevel logLevel) /+5.5.0

  • Description: Adds a log level to be used by MoPubLog. Returns the builder.

  • Parameters:

public SdkConfiguration.Builder /withMediatedNetworkConfiguration(String adapterConfigurationClass, Map<String,String> mediatedNetworkConfiguration) /+5.5.0

  • Description: Adds a single mediated network configuration keyed by the AdapterConfiguration class. This is used by ad networks’ initialization. Returns the builder.

  • Parameters:

    • adapterConfigurationClass: The class name to key on.
    • mediatedNetworkConfiguration: A Map of network configurations.

public SdkConfiguration.Builder /withMediationSettings(MediationSettings... mediationSettings) /+5.0.0

  • Description: Adds mediation settings for rewarded video mediation adapters. Returns the builder.

  • Parameters:

    • mediationSettings: Array of mediation settings. Can be empty but not null.

public SdkConfiguration.Builder /withMoPubRequestOptions(String adapterConfigurationClass, Map<String,String> mopubRequestOptions) /+5.5.0

  • Description: Adds a single MopubRequestOption keyed by the AdapterConfiguration class. Returns the builder.

  • Parameters:

    • adapterConfigurationClass: The class name to key on.
    • mopubRequestOptions: A Map of options.

Last updated July 10, 2020

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2020 MoPub (a division of Twitter, Inc.)