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.
-
-
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 RenderedState(AdUnit adUnit, AdComponent adComponent, PublisherCallbacks publisherCallbacks, StateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description Unitinitialize()Initializes the rendered state. final UnitonUserLeftApplication()Handles user left application events. final UnitonAdClicked(Map<Object, Object> params)Handles ad click events. final UnitonAdImpression(TelemetryOnAdImpression telemetryOnAdImpression)Handles ad impression events. 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
-
RenderedState
RenderedState(AdUnit adUnit, AdComponent adComponent, PublisherCallbacks publisherCallbacks, StateMachine stateMachine)
-
-
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.
-
-
-
-