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.)
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description
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.
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
Note that once a
requestNativeAdcall has been made, the AppNexus SDK expects
onAdFailedto be called through the
MediatedNativeAdControllerwithin 15 seconds or the mediation call is considered to have failed.
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.