Class OtvInsightWrapper

java.lang.Object
com.nagra.otvaa.sdk.insightwrapper.OtvInsightWrapper

public class OtvInsightWrapper extends Object
  • Constructor Details

    • OtvInsightWrapper

      public OtvInsightWrapper(Context xContext, com.nagra.insight.agent.InsightConfig config, WrapperConfig wrapperConfig)

      Constructs the Agent Wrapper.


      This constructor gives the ability to programmatically configure the agent instead of using the analytics.json configuration file that normally stands in the /res/raw/ folder of the player application. The file can exist but will just be ignored.


      If the specified deviceId in the InsightConfig object is null then the final value for the device ID will be set to Settings.Secure.ANDROID_ID.

      Parameters:
      xContext - the context used by the SDK
      config - configuration to be passed to the agent
      wrapperConfig - additional configuration only related to the wrapper
  • Method Details

    • startSession

      public void startSession(@NonNull Object xPlayerHandler, @NonNull ContentInfoHolder xContentInfoHolder, @NonNull UserInfoHolder xUserInfoHolder)
      Starts the session with the content information and user information.
      Parameters:
      xPlayerHandler - the PlayerHandler instance on which the content is played
      xContentInfoHolder - the content metadata info container
      xUserInfoHolder - the user metadata info container
    • stopSession

      public void stopSession()
      Stops the session.
    • release

      public void release()
      Stops the session and releases all agent resources. Note: to be able to use the agent again then you would need to instantiate a new wrapper.