Class NativeUnTrackedState

  • 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 NativeUnTrackedState
     implements State, RegisterTrackingListener, AUDestroyListener
                        

    State representing a native ad unit that has been untracked from view monitoring. This state preserves the ad components and cache while allowing for re-registration of tracking when views are provided again. It maintains all previously established state data to enable seamless transition back to rendered state.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit initialize() Initializes the untracked state by saving current logger state.
      Unit registerViewForTracking(InMobiNativeViewData nativeViewData) Re-registers views for tracking and transitions back to the rendered state.
      Unit onDestroy() Handles destruction of the untracked state by cleaning up resources and transitioning to destroyed state.
      • 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

      • NativeUnTrackedState

        NativeUnTrackedState(View adChoiceView, MediaView mediaView, RenderedStateCache renderedStateCache, AdSessionManager adSessionManager, ContextualDataHandler contextualDataHandler, NativeBeaconProcessor nativeBeaconProcessor, NativeAdUnitComponent nativeAdUnitComponent, NativeAdUnitStateMachine stateMachine)
        Parameters:
        adChoiceView - The ad choice view for privacy controls, if available.
        mediaView - The media view containing video or image content, if available.
        renderedStateCache - The cached state data from previous rendered state.
        adSessionManager - The OM-SDK ad session manager for viewability tracking.
        contextualDataHandler - The handler for contextual data processing.
        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 untracked state by saving current logger state. This ensures that any logging context is preserved during the untracked period.

      • registerViewForTracking

         Unit registerViewForTracking(InMobiNativeViewData nativeViewData)

        Re-registers views for tracking and transitions back to the rendered state.

        This method creates a new rendered state provider with the existing cache data and all preserved components, allowing the ad to resume tracking seamlessly.

        Parameters:
        nativeViewData - The publisher's native view configuration for re-registration.
      • onDestroy

         Unit onDestroy()

        Handles destruction of the untracked state by cleaning up resources and transitioning to destroyed state.