Class NativeLoadedState
-
- All Implemented Interfaces:
-
com.inmobi.media.ads.common.base.state.State,com.inmobi.media.ads.common.listeners.AUDestroyListener,com.inmobi.media.ads.nativeAd.listeners.RegisterTrackingListener
public final class NativeLoadedState extends AdComponentWrapper implements State, RegisterTrackingListener, AUDestroyListener
Represents the loaded state of a native ad unit. This state is reached when the native ad has been successfully loaded and inflated. It provides the native ad data to the publisher and waits for view registration before transitioning to the rendered state.
-
-
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 NativeLoadedState(MediaView mediaView, View adChoice, AdSessionManager adSessionManager, NativeBeaconProcessor nativeBeaconProcessor, NativeAdUnitComponent nativeAdUnitComponent, NativeAdUnitStateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description Unitinitialize()Initializes the loaded state by preparing native ad data and notifying the callback. UnitregisterViewForTracking(InMobiNativeViewData inMobiNativeViewData)Registers the provided view data for tracking and transitions to the rendered state. UnitonDestroy()Handles the destruction of the loaded state. -
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
-
NativeLoadedState
NativeLoadedState(MediaView mediaView, View adChoice, AdSessionManager adSessionManager, NativeBeaconProcessor nativeBeaconProcessor, NativeAdUnitComponent nativeAdUnitComponent, NativeAdUnitStateMachine stateMachine)
- Parameters:
mediaView- The media view containing video or image content, if available.adChoice- The ad choice view for privacy controls, if available.adSessionManager- The OM-SDK ad session manager for viewability tracking.nativeBeaconProcessor- The beacon processor for tracking ad events.nativeAdUnitComponent- The dependency injection component providing core dependencies.stateMachine- The state machine managing the lifecycle transitions.
-
-
Method Detail
-
initialize
Unit initialize()
Initializes the loaded state by preparing native ad data and notifying the callback.
-
registerViewForTracking
Unit registerViewForTracking(InMobiNativeViewData inMobiNativeViewData)
Registers the provided view data for tracking and transitions to the rendered state. This method is called when the publisher provides the views for impression and click tracking.
- Parameters:
inMobiNativeViewData- The view data containing all views that need to be tracked.
-
-
-
-