Interface AdUnitCallback

  • All Implemented Interfaces:
    com.inmobi.media.ads.common.listeners.FullScreenListener

    
    public interface AdUnitCallback
     implements FullScreenListener
                        

    Comprehensive callback interface for ad unit lifecycle and interaction events.

    This interface extends FullScreenListener and provides callbacks for critical ad unit events including load failures, user interactions, application navigation, and impression tracking. It serves as the primary communication channel between ad units and their managing components, enabling proper error handling, user interaction tracking, and telemetry collection.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onLoadFailure(Short errorCode, InMobiAdRequestStatus status) Called when an ad load operation has failed.
      abstract Unit onAdClicked(Map<Object, Object> params) Called when a user clicks on the ad.
      abstract Unit onUserLeftApplication() Called when the user leaves the application due to ad interaction.
      abstract Unit onAdImpression(TelemetryOnAdImpression telemetryOnAdImpression) Called when an ad impression is recorded.
      • Methods inherited from class com.inmobi.media.ads.common.listeners.FullScreenListener

        onAdFullScreenDismissed, onAdFullScreenDisplayed
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onLoadFailure

         abstract Unit onLoadFailure(Short errorCode, InMobiAdRequestStatus status)

        Called when an ad load operation has failed.

        This method is invoked when the ad unit encounters an error during the loading process, providing both an error code for categorization and a status object with detailed failure information.

        Parameters:
        errorCode - A short value indicating the specific type of load failure
        status - The InMobiAdRequestStatus containing detailed error information
      • onAdClicked

         abstract Unit onAdClicked(Map<Object, Object> params)

        Called when a user clicks on the ad.

        This method is invoked when the user interacts with the ad content by clicking or tapping, providing additional parameters about the interaction context and metadata.

        Parameters:
        params - A map containing click-related parameters and metadata
      • onUserLeftApplication

         abstract Unit onUserLeftApplication()

        Called when the user leaves the application due to ad interaction.

        This method is invoked when an ad interaction causes the user to navigate away from the current application, typically to an external browser, app store, or another application.

      • onAdImpression

         abstract Unit onAdImpression(TelemetryOnAdImpression telemetryOnAdImpression)

        Called when an ad impression is recorded.

        This method is invoked when the ad has been successfully displayed and an impression event is tracked. It may include optional telemetry data for detailed impression analytics and reporting.

        Parameters:
        telemetryOnAdImpression - Optional TelemetryOnAdImpression data for detailed tracking