Package 

Class OmAdSessionManager


  • 
    public class OmAdSessionManager
    
                        

    OmAdSessionManager is an implementation of Open Measurement used to track web and native video ad events.

    • Method Detail

      • activateOmSdk

         static boolean activateOmSdk(Context applicationContext)

        First step to begin with when working with this class.NOTE: The OmAdSessionManager instance won't be created if OMSDK activation fails.

      • initVideoAdSession

         void initVideoAdSession(AdVerifications adVerifications, String contentUrl)

        Initializes Native Video AdSession from AdVerifications.

        Parameters:
        adVerifications - VAST AdVerification node
      • displayAdLoaded

         void displayAdLoaded()

        Registers the display ad load event.

      • nonSkippableStandaloneVideoAdLoaded

         void nonSkippableStandaloneVideoAdLoaded(boolean isAutoPlay)

        Registers the video ad load event.

        Parameters:
        isAutoPlay - indicates if ad starts after load.
      • videoAdStarted

         void videoAdStarted(float duration, float videoPlayerVolume)

        Registers video ad started event.

        Parameters:
        duration - native video ad duration.
        videoPlayerVolume - native video player volume.
      • registerImpression

         void registerImpression()

        Signals the impression event occurring. Generally accepted to be on ad render.

      • trackVolumeChange

         void trackVolumeChange(float volume)

        Registers volume change event.

        Parameters:
        volume - changed volume.
      • trackAdVideoEvent

         void trackAdVideoEvent(VideoAdEvent.Event adEvent)
        Registers ad video events.
        
        Playback:
                             AD_FIRSTQUARTILE,
                             AD_MIDPOINT,
                             AD_THIRDQUARTILE,
                             AD_COMPLETE;
        Visibility:
                             AD_PAUSE,
                             AD_RESUME,
        player state change:
                             AD_FULLSCREEN,
                             AD_EXITFULLSCREEN,
        impression:
                             AD_IMPRESSION
        adUserInteraction:
                             AD_CLICK
        Parameters:
        adEvent - events which are handled.
      • startAdSession

         void startAdSession()

        Prepares the AdSessions for tracking. This does not trigger an impression.

      • stopAdSession

         void stopAdSession()

        Stop the AdSessions when the impression has completed and the ad will be destroyed

      • registerAdView

         void registerAdView(View adView)

        Registers a view on which to track viewability.

        Parameters:
        adView - View on which to track viewability.