Initialization /

API for MoPub SDK initialization.

Public Properties

public static string /SdkName /+5.0.0

  • Description: Returns a human-readable string of the MoPub SDK being used. A String with the MoPub SDK platform and version.

public static bool /IsSdkInitialized /+5.0.0

  • Description: Flag indicating if the SDK has been initialized. Returns true if a call to initialize the SDK has been made; false otherwise.

public static LogLevel /SdkLogLevel /+5.0.0

public static bool /AllowLegitimateInterest /+5.5.0

  • Description: Allow supported SDK networks to collect user information on the basis of legitimate interest.

Public Methods

public static void /InitializeSdk(string anyAdUnitId) /+5.0.0

  • Description: Asynchronously initializes the relevant (Android or iOS) MoPub SDK. Refer to MoPubManager.OnSdkInitializedEvent for resulting triggered event. The MoPub SDK needs to be initialized on Start() to ensure all other objects have been enabled first. (Start() rather than Awake() so that MoPubManager has had time to Awake() and OnEnable() in order to receive event callbacks.)

  • Parameters:

    • anyAdUnitId: String with any ad unit ID used by this app.

public static void /InitializeSdk(SdkConfiguration sdkConfiguration) /+5.0.0

  • Description: Asynchronously initializes the relevant (Android or iOS) MoPub SDK. Call this before making any rewarded ads or advanced bidding requests. This will perform the rewarded video custom event initialization any number of times, but the SDK itself can only be initialized once, and the rewarded ads module can only be initialized once. Refer to MoPubManager.OnSdkInitializedEvent for the resulting triggered event. The MoPub SDK needs to be initialized on Start() to ensure all other objects have been enabled first. ((Start() rather than Awake(), so that MoPubManager has had time to Awake() and OnEnable() in order to receive event callbacks.)

  • Parameters:

    • sdkConfiguration: The configuration including at least an ad unit. Refer to MoPub.SdkConfiguration for details.

public static void /LoadBannerPluginsForAdUnits(string[] adUnitIds) /+5.0.0

  • Description: Initializes a platform-specific MoPub SDK banner plugin for each given ad unit.

  • Parameters:

    • adUnitIds: The ad units for which to initialize plugins.

public static void /LoadInterstitialPluginsForAdUnits(string[] adUnitIds) /+5.0.0

  • Description: Initializes a platform-specific MoPub SDK interstitial plugin for each given ad unit.

  • Parameters:

    • adUnitIds: The ad units for which to initialize plugins.

public static void /LoadRewardedVideoPluginsForAdUnits /+5.0.0

  • Description: Initializes a platform-specific MoPub SDK interstitial plugin for each given ad unit.

  • Parameters:

    • adUnitIds: The ad units for which to initialize plugins.

public static void /EnableLocationSupport(bool shouldUseLocation) /+5.0.0

  • Description: Enables or disables location support for banners and interstitials.

  • Parameters:

    • shouldUseLocation: Whether location should be enabled or not.

public static void /ReportApplicationOpen(string iTunesAppId) /+5.0.0

  • Description: Reports an app download to MoPub.

  • Parameters:

    • iTunesAppId: The app ID on the App Store (only applicable to iOS). Default value is null.

Last updated July 22, 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.)