Millennial Media Android Ad SDK Public Documentation  6.4.0
Public Member Functions | List of all members
NativeAd.NativeListener Interface Reference

Public Member Functions

void onLoaded (NativeAd nativeAd)
 
void onLoadFailed (NativeAd nativeAd, NativeErrorStatus errorStatus)
 
void onClicked (NativeAd nativeAd, ComponentName componentName, int instanceId)
 
void onAdLeftApplication (NativeAd nativeAd)
 
void onExpired (NativeAd nativeAd)
 

Detailed Description

Interface that defines the callbacks to be invoked when NativeAd events occur.

Member Function Documentation

◆ onAdLeftApplication()

void onAdLeftApplication ( NativeAd  nativeAd)

Called when the NativeAd causes the active context to leave the application. For example clicking on a link and launching a browser.

Parameters
nativeAdthe NativeAd that caused the context switch

◆ onClicked()

void onClicked ( NativeAd  nativeAd,
ComponentName  componentName,
int  instanceId 
)

Called when the NativeAd has been clicked.

Parameters
nativeAdthe NativeAd that the click event occurred on
componentNamename of the component
instanceIdid of the instance that was clicked

◆ onExpired()

void onExpired ( NativeAd  nativeAd)

Called when the NativeAd has expired and needs to be reloaded.

Parameters
nativeAdthe NativeAd that the expire event occurred on

◆ onLoaded()

void onLoaded ( NativeAd  nativeAd)

Called when the NativeAd has successfully loaded new ad content and is ready to be shown.

Parameters
nativeAdthe NativeAd that the successful load event occurred on

◆ onLoadFailed()

void onLoadFailed ( NativeAd  nativeAd,
NativeErrorStatus  errorStatus 
)

Called when the NativeAd has failed to load new ad content.

An ErrorStatus instance provides detail about the error.

Parameters
nativeAdthe NativeAd that the failure event occurred on
errorStatusthe ErrorStatus that describes the cause of the failure