AdapterConfiguration

public interface AdapterConfiguration

An interface containing methods used for configuring adapters and network SDKs. Publishers can subclass this class to initialize the network SDK, return SDK adapter versions, return the Advanced Bidding token, and return the network name.

Public Methods

public String /getAdapterVersion()

  • Description: Returns the adapter version. This is typically a four-digit version scheme of which the leftmost three digits correspond to the network SDK version, and the last digit corresponds to the minor version number referring to an adapter release.

  • Parameters: None.

public String /getBiddingToken(Context context)

  • Description: Returns the advanced bidding token, if this adapter has advanced bidding enabled; otherwise, return null.

  • Parameters:

    • context: Current context.

public String /getCachedInitializationParameters(Context context)

public String /getMoPubNetworkName()

  • Description: Returns the MoPub-internal name for this particular network, typically a lowercase string representing the network name. Underscores should be used if the string needs spaces.

  • Parameters: None.

public String /getMoPubRequestOptions()

  • Description: Returns the map of options passed to our ad server.

  • Parameters: None.

public String /getNetworkSdkVersion()

  • Description: Returns the version of the network SDK.

  • Parameters: None.

public void /initializeNetwork(Context context, String configuration, OnNetworkInitializationFinishedListener listener)

  • Description: Initializes the ad network SDK. This logic executes alongside the initialization of the MoPub SDK (the initializeSdk() method). Ensure that the custom event always calls onNetworkInitializationFinished() afterward.

  • Parameters:

    • context: Current context.
    • configuration: A map containing key-value pairs of initialization parameters to be used for that network.
    • listener: An initialization event listener the custom event will call when initializing the network SDK.

public void /setCachedInitializationParameters(Context context, String configuration)

  • Description: Save initialization parameters for future use.

  • Parameters:

    • context: Current context.
    • configuration: A map containing key-value pairs of initialization parameters to be used for that network.

public void /setMoPubRequestOptions(String moPubRequestOptions)

  • Description: Sets a map of request options to send to the MoPub ad server.

  • Parameters:

    • moPubRequestOptions: A map of key-value pairs containing request options.

Last updated March 03, 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.)