Example Code Quick Setup

This guide enables you to demonstrate Connect Player features and view the example code. For more information, please see the Integration Guide.

Prerequisites

Make sure you have the latest Android Studio installed, including:

  • Android SDK - install the latest version from Android Studio when prompted.

  • Gradle - use the latest version as recommended by Android Studio.

  • JDK - use the version provided with Android Studio.

Download the Connect Player 5 SDK pack, which supplies all the files needed to launch the player and start streaming content.

  • opy-sdk-android-SW_VERSION-example-code.zip
    This contains several small application projects which demonstrate how to use simple and advanced features; for example, playing clear and encrypted streams.

  • opy-sdk-android-<SW_VERSION>-sdk-integration.aar
    This is the SDK binary file used for integration purposes.

You also need:

  • A valid Connect Player licence (opy_licence file).

  • A device running Android 5.x (Lollipop) onwards.

    The application must be run on an Android device enabled for debugging; the player cannot run on an Android Studio Simulator.

Procedure

  1. Save the SDK pack to your desktop and unzip it. The extracted package contains a zipped set of example code, extract the contents of the example-code.zip file to your desktop.

  2. Copy the opy_licence and opy-sdk-android-<SW_VERSION>-sdk-integration.aar files to the libs directory.

    NAGRA recommends you rename the opy-sdk-android-<SW_VERSION>-sdk-integration.aar file otvsdk.aar.

  3. Start Android Studio, select Open an existing Android Studio project and then select the required project in the top-level directory of the extracted package. The following projects are available:

  4. Connect an Android device to your development machine via USB, and build and run the application.

Further information

For full details on integrating the SDK with your application, see the Integration Guide. See also the API reference guide provided in the Android SDK pack.