Class OtvInsightWrapper
java.lang.Object
com.nagra.otvaa.sdk.insightwrapper.OtvInsightWrapper
-
Constructor Summary
ConstructorsConstructorDescriptionOtvInsightWrapper
(Context xContext, com.nagra.insight.agent.InsightConfig config, WrapperConfig wrapperConfig) Constructs the Agent Wrapper. -
Method Summary
Modifier and TypeMethodDescriptionvoid
release()
Stops the session and releases all agent resources.void
startSession
(Object xPlayerHandler, ContentInfoHolder xContentInfoHolder, UserInfoHolder xUserInfoHolder) Starts the session with the content information and user information.void
Stops the session.
-
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 SDKconfig
- configuration to be passed to the agentwrapperConfig
- 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 playedxContentInfoHolder
- the content metadata info containerxUserInfoHolder
- 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.
-