CustomEventBanner

public abstract class CustomEventBanner

A base class for custom events that support banner ads. Implementing a subclass of CustomEventBanner() enables the MoPub SDK to support banner mediation with other ad networks.

Public Methods

public protected abstract void /loadBanner(Context context, CustomEventBannerListener customEventBannerListener, Map<String,Object> localExtras, Map<String,String> serverExtras)

  • Description: Requests a banner ad for an ad network.

  • Parameters:

    • context: Current context.
    • customEventBannerListener: An interstitial listener object provided that mediation adapters can use to notify the MoPub SDK of interstitial lifecycle events.
    • localExtras: A map containing additional custom data a publisher can set by calling MoPubView.setLocalExtras() from the app.
    • serverExtras: A map containing server-side data that a publisher entered for a particular ad network in the MoPub UI. This data may contain dynamic information, such as ad unit IDs, that can be used to make ad requests to the network.

public protected abstract void /onInvalidate()

  • Description: Destroys the current banner object, as well as to unregister any hanging references.

  • Parameters: None.

public protected void /setAutomaticImpressionAndClickTracking(boolean autoTrack)

  • Description: Enables or disables automatic impression and click tracking. This is enabled by default, meaning that the MoPub SDK will track impressions and clicks using its definition. Disabling it customizes when to track impressions and clicks on MoPub’s side. Typically, publishers disable this when the network SDK exposes dedicated callbacks for impression and click tracking, to synchronize the tracking between the network and MoPub.

  • Parameters:

    • autoTrack: true to use automatic impression and click tracking; false to use manual impression and click tracking.

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