Unified API Example Code Quick Start
Use this guide to demonstrate Unified Player Interface (UPI) features and view the example code.
The Unified Player Interface (UPI) provides a different set of APIs, which are aligned with similar APIs on other CONNECT player platforms (Apple iOS/tvOS, Browsers, Connected TV, HbbTV, React Native). At the heart of this API is a player based on the IOTVUPIPlayer
interface rather than the traditional OTVVideoView
. See the nagra.otv.upi
package API documentation.
For the development tools, current dependencies and minimum build configuration required, see (5.33.x) Prerequisites and dependencies.
Download the Android SDK, which supplies all the files needed to launch the player and start streaming content.
opy-sdk-android-5.35.x-example-code-upi.zip
This package demonstrates how to work with the UPI interface.opy-sdk-android-5.35.x-sdk-integration.aar
The no-PRM version of the SDK binary file used for integration purposes.
You will also need a device running Android 5.x (Lollipop) onwards with debugging enabled; the player cannot run on an Android Studio simulator.
Procedure
Extract the opy-sdk-android-5.35.x-example-code-upi.zip to your desktop.
Go to opy-sdk-android-5.35.x-example-code-upi > common, and place the opy-sdk-android-5.35.x-sdk-integration.aar file in the libs folder.
Open Android Studio, select Open an Existing Project and locate the opy-sdk-android-5.35.x-example-code-upi folder.
When the project has built, select the required project from the dropdown menu (not the side file list); see the example projects below.
Connect an Android device to your development machine via USB and run the application.