Package com.inmobi.ads.listeners
Class NativeAdEventListener
- java.lang.Object
-
- com.inmobi.ads.listeners.NativeAdEventListener
-
public abstract class NativeAdEventListener extends java.lang.Object
A listener for receiving notifications during the lifecycle of a Native ad.
-
-
Constructor Summary
Constructors Constructor Description NativeAdEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
onAdClicked(InMobiNative ad)
Called to notify ad was clicked.void
onAdClicked(T ad, java.util.Map<java.lang.Object,java.lang.Object> params)
Called to notify that the user interacted with the ad.void
onAdFetchSuccessful(T ad, AdMetaInfo info)
Called to notify that an ad was received successfully but is not ready to be displayed yet.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)
Deprecated.void
onAdImpression(T ad)
Called to notify that inmobi has logged an impression for the advoid
onAdLoadFailed(T ad, InMobiAdRequestStatus status)
Called to notify that a request to load an ad failed.void
onAdLoadSucceeded(T ad)
Deprecated.void
onAdLoadSucceeded(T ad, AdMetaInfo info)
Called to notify that an ad was successfully loaded and is ready to be displayed.void
onAdReceived(InMobiNative ad)
Deprecated.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 createdvoid
onRequestPayloadCreationFailed(InMobiAdRequestStatus status)
Called to notify when the request payload creation failsvoid
onUserWillLeaveApplication(InMobiNative ad)
Called to notify that the user is about to leave the application as a result of interacting with it.
-
-
-
Method Detail
-
onAdReceived
@Deprecated public void onAdReceived(InMobiNative ad)
Deprecated.Called to indicate that an ad is available in response to a request for an ad (by callingInMobiNative.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 theInMobiNative.isReady()
method.- Parameters:
ad
- Represents theInMobiNative
ad for which ad content was received
-
onAdFullScreenDismissed
public void onAdFullScreenDismissed(InMobiNative ad)
- Parameters:
ad
- Represents theInMobiNative
ad whose fullscreen was dismissed
-
onAdFullScreenWillDisplay
public void onAdFullScreenWillDisplay(InMobiNative ad)
Called to notify that the ad will open an overlay that covers the screen.- Parameters:
ad
- Represents theInMobiNative
ad which will go fullscreen
-
onAdFullScreenDisplayed
public void onAdFullScreenDisplayed(InMobiNative ad)
Called to notify that the ad opened an overlay that covers the screen.- Parameters:
ad
- Represents theInMobiNative
ad whose fullscreen will be displayed
-
onUserWillLeaveApplication
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 theInMobiNative
ad
-
onAdImpressed
@Deprecated public void onAdImpressed(InMobiNative ad)
Deprecated.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 theInMobiNative
ad for which impression is recorded.
-
onAdClicked
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 theInMobiNative
ad which was clicked
-
onAdStatusChanged
public void onAdStatusChanged(InMobiNative nativeAd)
Called to notify that the ad status has changed.- Parameters:
nativeAd
- Represents theInMobiNative
ad
-
onAdFetchSuccessful
public void onAdFetchSuccessful(T ad, AdMetaInfo info)
Called to notify that an ad was received successfully but is not ready to be displayed yet.- Parameters:
ad
- Represents the ad which was loaded or preloadedinfo
- Represents the ad meta information
-
onAdLoadSucceeded
@Deprecated public void onAdLoadSucceeded(T ad)
Deprecated.This method has been deprecated, please start usingonAdFetchSuccessful(Object, AdMetaInfo)
instead. Called to notify that an ad was successfully loaded.- Parameters:
ad
- Represents the ad which was loaded
-
onAdLoadSucceeded
public void onAdLoadSucceeded(T ad, AdMetaInfo info)
Called to notify that an ad was successfully loaded and is ready to be displayed.- Parameters:
ad
- Represents the ad which was loadedinfo
- Represents the ad meta information
-
onAdLoadFailed
public void onAdLoadFailed(T ad, InMobiAdRequestStatus status)
Called to notify that a request to load an ad failed.- Parameters:
ad
- Represents the ad which failed to loadstatus
- Represents theInMobiAdRequestStatus
status containing error reason
-
onAdClicked
public void onAdClicked(T ad, java.util.Map<java.lang.Object,java.lang.Object> params)
Called to notify that the user interacted with the ad.- Parameters:
ad
- Represents the ad on which user clickedparams
- Represents the click parameters
-
onRequestPayloadCreated
public void onRequestPayloadCreated(byte[] requestPayload)
Called to notify when the request payload is created- Parameters:
requestPayload
- Represents the request payload
-
onRequestPayloadCreationFailed
public void onRequestPayloadCreationFailed(InMobiAdRequestStatus status)
Called to notify when the request payload creation fails- Parameters:
status
- Represents theInMobiAdRequestStatus
status containing error reason
-
onAdImpression
public void onAdImpression(T ad)
Called to notify that inmobi has logged an impression for the ad- Parameters:
ad
- Represents the ad which was impressed
-
-