Millennial Media Android Ad SDK Public Documentation  6.6.1
Classes | Public Member Functions | Public Attributes | List of all members
CustomEventNative Interface Reference
Inheritance diagram for CustomEventNative:
CustomEvent

Classes

interface  CustomEventNativeListener
 

Public Member Functions

void loadNativeAd (Context context, CustomEventNativeListener listener, Bundle mediationExtras)
 
void onAdLoaded (NativeAd nativeAd)
 
void onAdClicked (NativeAd nativeAd)
 
void destroy ()
 
String getType ()
 

Public Attributes

String PLACEMENT_ID_KEY = "PLACEMENT_ID"
 

Detailed Description

This interface is used by a third party SDK to provide native ads to the One by AOL SDK.

Member Function Documentation

◆ destroy()

void destroy ( )

Called by the SDK when the ad placement is being destroyed. A third party should use this to perform any clean up related to this ad instance

◆ getType()

String getType ( )

This method returns the type of native ad that this custom event will provide. Unless AOL has provided you a specific type for your network you should return CustomEventNative#DEFAULT_TYPE.

Returns
the type code for the native ad that will be provided by this custom event.

◆ loadNativeAd()

void loadNativeAd ( Context  context,
CustomEventNativeListener  listener,
Bundle  mediationExtras 
)

This method is called by the One by AOL SDK to request a native ad from the third party SDK. Upon succesful load of a native ad the third party SDK should call the onLoaded callback.

Parameters
contextan instance of Context
listeneran instance of CustomEventNativeListener that the third party SDK must use to communicate with the One by AOL SDK.
mediationExtrasconfiguration data for the third party. The placement id is always mapped using the CustomEvent#PLACEMENT_ID_KEY.

◆ onAdClicked()

void onAdClicked ( NativeAd  nativeAd)

This method is called by the One by AOL SDK when the NativeAd is clicked. This allows the third party SDK to respond to the click event.

Parameters
nativeAdthe Native Ad instance that was clicked

◆ onAdLoaded()

void onAdLoaded ( NativeAd  nativeAd)

This method is called by the One by AOL SDK once the NativeAd placement is populated. This allows the third party SDK access to the final view components.

Parameters
nativeAdthe Native Ad instance that was loaded

Member Data Documentation

◆ PLACEMENT_ID_KEY

String PLACEMENT_ID_KEY = "PLACEMENT_ID"
inherited

Key to use for obtaining the third party placement identifier from the mediationExtras passed during an ad request.