Skip to end of metadata
Go to start of metadata

JavaScript is disabled on your browser.
com.appnexus.opensdk

Interface MediatedNativeAd



  • public interface MediatedNativeAd

    This is the interface a mediation adaptor must implement for requesting native ads. The mediation interface allows third-party SDKs to be called by the AppNexus SDK.

    To integrate a third-party SDK, create a class that implements MediatedNativeAd. Implement the required method and configure it using the AppNexus Console for Publishers to be called whenever the targeting matches the conditions defined in the Console for Publishers.

    (Console for Publishers is a web application that AppNexus platform members can use to sell inventory across different demand sources, including ad networks that are not on the platform.)

    See Also:
    Console for Publishers, SDK Mediation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void requestNativeAd(android.content.Context context, java.lang.String parameter, java.lang.String uid, com.appnexus.opensdk.MediatedNativeAdController mBC, TargetingParameters tp)
      The AppNexus SDK will call this method to ask the third-party SDK to request an ad from its network.
    • Method Detail

      • requestNativeAd

        void requestNativeAd(android.content.Context context,
                             java.lang.String parameter,
                             java.lang.String uid,
                             com.appnexus.opensdk.MediatedNativeAdController mBC,
                             TargetingParameters tp)

        The AppNexus SDK will call this method to ask the third-party SDK to request an ad from its network. The AppNexus SDK expects to be notified of events through the MediatedNativeAdController.

        Note that once a requestNativeAd call has been made, the AppNexus SDK expects onAdLoaded or onAdFailed to be called through the MediatedNativeAdController within 15 seconds or the mediation call is considered to have failed.

        Parameters:
        context - The activity from which this method was called.
        parameter - An optional opaque string passed from the Ad Network Manager, this can be used to defined SDK-specific parameters such as additional targeting information. The encoding of the contents of this string are entirely up to the implementation of the third-party SDK adaptor.
        uid - The network ID for this ad call. This ID is opaque to the AppNexus SDK and its contents and their encoding are up to the implementation of the third-party SDK.
        mBC - The controller to notify on load, failure, etc.
        tp - Targeting parameters passed from SDK to adapter.

  • No labels