Class NativeAdEventListener


  • public abstract class NativeAdEventListener
    extends java.lang.Object
    A listener for receiving notifications during the lifecycle of a Native ad.
    • Constructor Detail

      • NativeAdEventListener

        public NativeAdEventListener()
    • 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 calling InMobiNative.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 InMobiNative.isReady() method.

        Parameters:
        ad - Represents the InMobiNative ad for which ad content was received
      • onAdFullScreenDismissed

        public void onAdFullScreenDismissed​(InMobiNative ad)
        Parameters:
        ad - Represents the InMobiNative 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 the InMobiNative 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 the InMobiNative 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 the InMobiNative 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 the InMobiNative 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 the InMobiNative ad which was clicked
      • onAdStatusChanged

        public void onAdStatusChanged​(InMobiNative nativeAd)
        Called to notify that the ad status has changed.
        Parameters:
        nativeAd - Represents the InMobiNative 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 preloaded
        info - Represents the ad meta information
      • onAdLoadSucceeded

        @Deprecated
        public void onAdLoadSucceeded​(T ad)
        Deprecated.
        This method has been deprecated, please start using onAdFetchSuccessful(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 loaded
        info - 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 load
        status - Represents the InMobiAdRequestStatus 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 clicked
        params - 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 the InMobiAdRequestStatus 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