Class AdSessionConfiguration

java.lang.Object
com.iab.omid.library.adsession.AdSessionConfiguration

public class AdSessionConfiguration extends Object
Created by pharris on 11/09/2017.
  • Method Details

    • createAdSessionConfiguration

      public static AdSessionConfiguration createAdSessionConfiguration(CreativeType creativeType, ImpressionType impressionType, Owner impressionOwner, Owner mediaEventsOwner, boolean isolateVerificationScripts)
      Create new ad session configuration supplying the owner for both the impression and media events along with the type of creative being rendered/measured The OM SDK JS service will use this information to help identify where the source of these events is expected to be received.
      Parameters:
      creativeType - type of creative to be rendered in this session.
      impressionType - type of impression to be triggered in this session.
      impressionOwner - of whether the native or JavaScript layer should be responsible for supplying the impression event.
      mediaEventsOwner - of whether the native or JavaScript layer should be responsible for supplying media events. This needs to be set only for non-display ad sessions and can be set to `Owner.NONE` for display. When the creativeType is DEFINED_BY_JAVASCRIPT then this should be set to JAVASCRIPT
      isolateVerificationScripts - When true, verification scripts are in a sandboxed iframe. When false, verification scripts have access to DOM of webview. This setting is only applicable when verification script resources are injected via the javascript session client (typically this would only be relevant for HTML video ad sessions)
      Returns:
      new ad session configuration instance.
      Throws:
      IllegalArgumentException - if the supplied impressionOwner is null.
    • isNativeImpressionOwner

      public boolean isNativeImpressionOwner()
      For OM SDK internal use only.
    • isNativeMediaEventsOwner

      public boolean isNativeMediaEventsOwner()
      For OM SDK internal use only.
    • toJsonObject

      public JSONObject toJsonObject()
      For OM SDK internal use only.