MoPubNative

public class MoPubNative

The object representing a MoPub native ad. This class is intended for a manual native ad integration. Refer here for additional implementation instructions. To use the ad placer, refer here.

Public Methods

public void /destroy()

  • Description: Removes existing native ad instance in session. Used when finished showing an ad to free up existing resources.

  • Parameters: None.

public void /makeRequest()

  • Description: Issues an ad request. Only called after initializing the SDK with initializeSdk().

  • Parameters: None.

public void /makeRequest(RequestParameters requestParameters)

  • Description: Issues an ad request with the specified request parameters.

  • Parameters:

public void /makeRequest(RequestParameters requestParameters, Integer sequenceNumber)

public void /registerAdRenderer(MoPubAdRenderer moPubAdRenderer)

  • Description: Registers an ad renderer for rendering a specific native ad format.

  • Parameters: None.

public void /setLocalExtras(Map<String, Object> localExtras)

  • Description: Specifies a map of key-value pairs on the current native ad object to be passed in the ad request for ad targeting. Used to append additional data for mediation.

  • Parameters:

    • localExtras: A map containing additional custom data a publisher can set by calling MoPubNative.setLocalExtras() from the app.

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.)