Class RenderedState

  • All Implemented Interfaces:
    com.inmobi.media.ads.common.base.state.State , com.inmobi.media.ads.common.listeners.AUMDestroyListener

    
    public class RenderedState
    extends AdComponentWrapper implements State, AUMDestroyListener
                        

    Represents the state when an ad is currently being displayed and rendered to the user.

    This state manages ad interactions while the ad is visible, including handling user clicks, impression tracking, and user navigation events. It serves as the final active state in the ad lifecycle, forwarding user interaction events to the publisher callbacks and managing the ad unit's displayed state until destruction.

    • Method Detail

      • initialize

         Unit initialize()

        Initializes the rendered state.

        This method sets up the state for handling user interactions while the ad is being displayed to the user.

      • onUserLeftApplication

         final Unit onUserLeftApplication()

        Handles user left application events.

        This method is called when the user navigates away from the application while interacting with the ad, and notifies the publisher callbacks.

      • onAdClicked

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

        Handles ad click events.

        This method is called when the user clicks on the rendered ad and forwards the click information to the publisher callbacks.

        Parameters:
        params - Additional parameters associated with the ad click event
      • onAdImpression

         final Unit onAdImpression(TelemetryOnAdImpression telemetryOnAdImpression)

        Handles ad impression events.

        This method is called when an ad impression is tracked and forwards the impression information to the publisher callbacks for tracking.

        Parameters:
        telemetryOnAdImpression - Optional telemetry data associated with the impression
      • onDestroy

         Unit onDestroy()

        Handles destruction of the ad unit manager.

        Transitions to DestroyedState for proper cleanup, preserving the ad unit for final cleanup operations while clearing timeout references.