public abstract class

NativeAdEventListener

extends Object
java.lang.Object
   ↳ com.inmobi.ads.listeners.NativeAdEventListener

Class Overview

A listener for receiving notifications during the lifecycle of a Native ad.

Summary

Public Constructors
NativeAdEventListener()
Public Methods
void onAdClicked(InMobiNative ad)
Called to notify ad was clicked.
void onAdFullScreenDismissed(InMobiNative ad)
void onAdFullScreenDisplayed(InMobiNative ad)
Called to notify that the ad opened an overlay that covers the screen.
void onAdFullScreenWillDisplay(InMobiNative ad)
Called to notify that the ad will open an overlay that covers the screen.
void onAdImpressed(InMobiNative ad)
Called to notify impression has been recorded for this ad.
void onAdLoadFailed(InMobiNative ad, InMobiAdRequestStatus requestStatus)
Called to notify that a native ad failed to load.
void onAdLoadSucceeded(InMobiNative ad)
Called to indicate that an ad was loaded and it can now be shown.
void onAdReceived(InMobiNative ad)
Called to indicate that an ad is available in response to a request for an ad (by calling load().
void onAdStatusChanged(InMobiNative nativeAd)
Called to notify that the ad status has changed.
void onRequestPayloadCreated(byte[] requestPayload)
Called to notify when the request payload is created
void onRequestPayloadCreationFailed(InMobiAdRequestStatus status)
Called to notify when the request payload creation fails
void onUserWillLeaveApplication(InMobiNative ad)
Called to notify that the user is about to leave the application as a result of interacting with it.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NativeAdEventListener ()

Public Methods

public void onAdClicked (InMobiNative ad)

Called to notify ad was clicked. Note:Override this method to notify click to the Mediation Adapter.

Parameters
ad Represents the InMobiNative ad which was clicked

public void onAdFullScreenDismissed (InMobiNative ad)

Parameters
ad Represents the InMobiNative ad whose fullscreen was dismissed

public void onAdFullScreenDisplayed (InMobiNative ad)

Called to notify that the ad opened an overlay that covers the screen.

Parameters
ad Represents the InMobiNative ad whose fullscreen will be displayed

public void onAdFullScreenWillDisplay (InMobiNative ad)

Called to notify that the ad will open an overlay that covers the screen.

Parameters
ad Represents the InMobiNative ad which will go fullscreen

public void onAdImpressed (InMobiNative ad)

Called to notify impression has been recorded for this ad. Note:Override this method to notify viewable impression to the Mediation Adapter.

Parameters
ad Represents the InMobiNative ad for which impression is recorded.

public void onAdLoadFailed (InMobiNative ad, InMobiAdRequestStatus requestStatus)

Called to notify that a native ad failed to load.

Parameters
ad Represents the InMobiNative ad which failed to load
requestStatus Represents the InMobiAdRequestStatus status containing error reason

public void onAdLoadSucceeded (InMobiNative ad)

Called to indicate that an ad was loaded and it can now be shown. This will always be called after the onAdReceived(InMobiNative) callback.

Parameters
ad Represents the InMobiNative ad which was loaded

public void onAdReceived (InMobiNative ad)

Called to indicate that an ad is available in response to a request for an ad (by calling load().

Note This does not indicate that the ad can be shown yet. Your code should show an ad after the onAdLoadSucceeded(InMobiNative) method is called. Alternately, if you do not want to handle this event, you must test if the ad is ready to be shown by checking the result of calling the isReady() method.

Parameters
ad Represents the InMobiNative ad for which ad content was received

public void onAdStatusChanged (InMobiNative nativeAd)

Called to notify that the ad status has changed.

Parameters
nativeAd Represents the InMobiNative ad

public void onRequestPayloadCreated (byte[] requestPayload)

Called to notify when the request payload is created

Parameters
requestPayload Represents the request payload

public void onRequestPayloadCreationFailed (InMobiAdRequestStatus status)

Called to notify when the request payload creation fails

Parameters
status Represents the InMobiAdRequestStatus status containing error reason

public void onUserWillLeaveApplication (InMobiNative ad)

Called to notify that the user is about to leave the application as a result of interacting with it.

Parameters
ad Represents the InMobiNative ad