Class LoadingState

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

    
    public abstract class LoadingState
    extends AdComponentWrapper implements State, InternalLoadTimeoutListener, AUMDestroyListener
                        

    Represents the state when an ad unit is actively loading and rendering content.

    This abstract state manages the ad loading process by initiating the AdUnit inflation, handling load failures, and managing timeout scenarios. It implements listeners for internal load timeouts and destruction events. The state can transition to LoadFailedState on failures or timeouts, or to LoadedState upon successful loading completion.

    • Method Detail

      • getAdUnit

         abstract AdUnit getAdUnit()

        The ad unit instance responsible for rendering the ad content

      • initialize

         Unit initialize()

        Initializes the loading state and begins the ad inflation process.

        This method notifies the timeout manager that loading has started and initiates the ad unit inflation process for rendering the ad content.

      • onInternalLoadTimeout

         Unit onInternalLoadTimeout()

        Handles internal load timeout events during the loading process.

        This method determines the appropriate error code based on network connectivity and transitions to LoadFailedState with timeout details.

      • onDestroy

         Unit onDestroy()

        Handles destruction of the ad unit manager.

        Transitions to DestroyedState for proper cleanup, preserving the ad unit and timeout manager for final cleanup operations.