OpenTV Client SDK for Android

OpenTV Client SDK for Android Integration Guide

Download the following release files to see the SDK and source code details.

  • otv-android-sdk-<version>-apidocs.zip
    This contains the API documentation for the SDK.

  • otv-android-sdk-<version>-production.aar
    This is the release variant of the SDK.

  • otv-android-sdk-<version>-sample-app-src.zip
    This contains the source code for a reference application demonstrating SDK integration.


Reference Application

This Android Studio project demonstrates how to integrate the SDK into an application. It contains buttons and fields to emulate the various operations used in the workflows. The project is meant to be used as a source code reference for how to use the SDK, but should you want to run it you will have to:

  1. Extract the sample-app-src zip file.

  2. Place your copy of the SDK .aar file in the libs/ folder.

  3. For CONNECT authentication place your OpVault file in the src/main/res/raw/ folder and rename it connect_opvault.json.

  4. Update the file src/main/res/raw/das_config.json with the parameters matching your DAS server.

  5. Built and run the project in Android Studio.

This package also comes with Gradle Wrapper files so you can build the project from the command line (Windows, macOS or Linux).

gradlew assembleDebug


Usage

  • DRM - Select your choice of DRM from the drop down.

CONNECT DRM only works on specific devices where the MediaDRM plug-in for Connect is provided by the OS.

  • Tenant - Enter your OPF IAS tenant instance.

  • DAS Login - Initiate the Sign On By CASN/DAS procedure.


Adding the SDK to your project

You can add the SDK to an Android Gradle project by adding your desired variant to your dependencies block in your build.gradle.kts file. There are several ways to do this; NAGRA recommends adding it to your libs/ folder and using the excerpt below.

Kotlin
...
dependencies {
	...
    implementation fileTree(include: ['*.aar'], dir: 'libs')
	...
}
...