Class LoadedState
-
- All Implemented Interfaces:
-
com.inmobi.media.ads.common.base.state.State,com.inmobi.media.ads.common.listeners.AUMDestroyListener,com.inmobi.media.ads.nativeAd.adUnitManager.listeners.AdDisplayedListener
public abstract class LoadedState extends AdComponentWrapper implements State, AdDisplayedListener, AUMDestroyListener
Represents the state when an ad has been successfully loaded and is ready for display.
This abstract state indicates that the ad loading process completed successfully and the ad is ready to be shown to the user. It handles the transition from successful loading to displaying the ad, and manages the progression to RenderedState when the ad is actually displayed. The state also handles destruction scenarios.
-
-
Field Summary
Fields Modifier and Type Field Description private final ContextapplicationContextprivate final CoroutineScopeadManagerScopeprivate final AdContextadContextprivate final AdConfigadConfigprivate final PubSettingspubSettingsprivate final AdContext.ViewabilityContextviewabilityprivate final AdMetaInfoadMetaInfoprivate final MetaInfometaInfoprivate final InMobiLoggerloggerprivate final AdLifecycleDataadLifecycleDataprivate final AdManagerTelemetryHelperadManagerTelemetryHelper
-
Constructor Summary
Constructors Constructor Description LoadedState(AdUnit adUnit, AdComponent adComponent, AdUnitTimeoutManager adUnitTimeout, AUMStateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description Unitinitialize()Initializes the loaded state and marks the load operation as successful. UnitonAdDisplayed()Handles the transition when an ad is displayed to the user. UnitonDestroy()Handles destruction of the ad unit manager. -
Methods inherited from class com.inmobi.media.ads.context.wrapper.AdComponentWrapper
getAdConfig, getAdContext, getAdLifecycleData, getAdManagerScope, getAdManagerTelemetryHelper, getAdMetaInfo, getApplicationContext, getLogger, getMetaInfo, getPubSettings, getViewability -
Methods inherited from class com.inmobi.media.ads.common.base.state.State
cleanUp -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LoadedState
LoadedState(AdUnit adUnit, AdComponent adComponent, AdUnitTimeoutManager adUnitTimeout, AUMStateMachine stateMachine)
-
-
Method Detail
-
initialize
Unit initialize()
Initializes the loaded state and marks the load operation as successful.
This method notifies the timeout manager of successful loading and updates the ad lifecycle data to reflect the successful load completion.
-
onAdDisplayed
Unit onAdDisplayed()
Handles the transition when an ad is displayed to the user.
This method is called when the ad becomes visible to the user and transitions to RenderedState to handle post-display interactions.
-
onDestroy
Unit onDestroy()
Handles destruction of the ad unit manager.
Transitions to DestroyedState for proper cleanup, preserving all components for final cleanup operations.
-
-
-
-