MoPubNative /2.0

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() /+2.0

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

  • Parameters: None.

public void /makeRequest() /+2.0

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

  • Parameters: None.

public void /makeRequest(RequestParameters requestParameters) /+2.0

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

  • Parameters:

public void /makeRequest(RequestParameters requestParameters, Integer sequenceNumber) /+2.0

public void /registerAdRenderer(MoPubAdRenderer moPubAdRenderer) /+4.0.0

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

  • Parameters: None.

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

  • 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 August 28, 2021

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.

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