Skip to main content
Skip table of contents

Android SDK 5 Example Code Quick Start

This guide enables you to demonstrate the CONNECT Player features and view the example code.

For the development tools, current dependencies and minimum build configuration required, see Prerequisites and dependencies.

Some features may have additional dependencies and libraries; see the README.md and build.gradle files in the relevant example code packages. 

Download the Android SDK, which supplies all the files needed to launch the player and start streaming content.

  • opy-sdk-android-5.24.x-example-code.zip
    This contains application projects which demonstrate how to use the player features.
  • opy-sdk-android-5.24.x-sdk-integration.aar
    This is the SDK binary file used for integration purposes.

Procedure

  1. Extract the opy-sdk-android-5.24.x-example-code.zip file to your desktop.
  2. Go to opy-sdk-android-5.24.x-example-code > common, and place the opy-sdk-android-5.24.x-sdk-integration.aar file in the libs folder.
  3. Open Android Studio and select Open an Existing Project and locate the opy-sdk-android-5.24.x-example-code folder.
  4. When the project has built, select the required project from the dropdown menu (not the side file list); see the example projects below.
  5. Connect an Android device to your development machine via USB and run the application.

Example projects

Playback

  • basic-playback - Demonstrates playback of a clear stream with no additional functionality.
  • bookmark - Shows how to capture bookmark details when stopping playback and how to restore them when resuming.
  • controlbar - Shows how to create a bespoke control bar in the application to control the player.
  • multi-instance - Provides multiple instances of the player.
  • lowlatency - Playback of a low-latency DASH stream, including configuration of low-latency parameters.
  • output-control - Playback of clear streams with output control.
  • resolution-capping - Playback of clear streams with resolution capping.
  • thumbnails  - Playback of clear streams with DASH-IF thumbnail previews.
  • harmonicthumbnails - Playback of clear streams with Harmonic WebVTT thumbnail previews.
  • thumbnails-iframe - Playback of clear streams with HLS I-Frame thumbnail preview.
  • track-selection - Playback of clear streams with multi-audio.
  • android-tv-preview  - Previews of unencrypted and encrypted channels on the  Android TV  home screen.
  • tunneled-playback -  Playback with video decoding and rendering in tunnelled mode.
  • viewport - Playback with viewport size detection.

Offline playback

Encrypted playback

Content security

Advertising

  • dynamic-ads-ima - Playback of clear streams with Google IMA adverts.
  • server-side-ad-insertion - Demonstrates use of adverts within streams with Server-Side Ad Insertion.
  • yospace - Demonstrates the integration of the Yospace user interface handling of streams with Server-Side Ad Insertion.

Statistics and analytics

Hardware support

  • chromecast  - Playback of clear, encrypted and SSM streams on Chromecast.
  • connect-dash - Playback of CONNECT-encrypted DASH streams with NAGRA CONNECT.
  • connect-prm -  Playback of CONNECT-encrypted HLS streams with NAGRA CONNECT.
  • smartbeam - Shows how an application can playback streams in conjunction with Broadpeak SmartBeam set-top box.

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.