Class NativeUnTrackedState

  • 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 , com.inmobi.media.ads.nativeAd.listeners.RegisterTrackingListener

    
    public final class NativeUnTrackedState
     implements State, RegisterTrackingListener, AdDisplayedListener, AUMDestroyListener
                        

    State representing a native ad that has been untracked from view monitoring. This state is reached when the ad tracking has been explicitly removed but the ad remains available for re-registration. It allows views to be registered again and transitions back to rendered state when display events occur.

    • 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 removing view tracking from the ad unit.
      Unit registerViewForTracking(InMobiNativeViewData inMobiNativeViewData) Re-registers views for tracking, allowing the ad to be displayed again.
      Unit onAdDisplayed() Handles ad display events and transitions back to the rendered state.
      Unit onDestroy() Handles ad unit destruction by transitioning to the 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(NativeAdUnit adUnit, AdComponent adComponent, PublisherCallbacks publisherCallbacks, StateMachine stateMachine)
        Parameters:
        adUnit - The native ad unit managing the ad lifecycle.
        adComponent - The ad component containing ad context and configuration.
        publisherCallbacks - The callback interface for publisher events.
        stateMachine - The state machine managing native ad unit states.
    • Method Detail

      • initialize

         Unit initialize()

        Initializes the untracked state by removing view tracking from the ad unit.

      • registerViewForTracking

         Unit registerViewForTracking(InMobiNativeViewData inMobiNativeViewData)

        Re-registers views for tracking, allowing the ad to be displayed again. This method delegates to the ad unit to handle view registration.

        Parameters:
        inMobiNativeViewData - The view data containing all views that need to be tracked.
      • onAdDisplayed

         Unit onAdDisplayed()

        Handles ad display events and transitions back to the rendered state. This method is called when the ad becomes visible again after being untracked.

      • onDestroy

         Unit onDestroy()

        Handles ad unit destruction by transitioning to the destroyed state.