Skip to main content
Skip table of contents

DAS Client for Android Integration Guide

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

  • dasc-sdk-android-5.2.x-debug.aar / debug.aar

    This contains the debug variant of the SDK.

  • dasc-sdk-android-5.2x-release.aar / release.aar

    This contains the release variant of the SDK.

  • dasc-sdk-android-5.2.x-javadoc.jar / javadoc.jar
    This contains the API documentation for the SDK.

  • dasc-sdk-android-5.2.x-sample-app-src.zip / 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 DAS Client SDK into an application. It contains buttons and fields to emulate the various operations used in DAS. 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/man/res/raw/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): 

GROOVY
gradlew assembleDebug

Usage

  • CONNECT DRM - Toggle this button on to use functionality with the CONNECT DRM system.
    This only works on specific devices where the MediaDrm plug-in for Connect is provided by the OS.

  • Get License - Use parameters in the fields above to authenticate the device and start a DAS session. The three fields below would get populated if successful.

  • Encrypt - Once authentication is successful and a DAS session is started, you can encrypt data from the Input Buffer field and see the results in the Output field.

  • Decrypt - Decrypt data from the Input Buffer and see the results in the Output field.

  • Sign - Protect data in the buffer and produce a signature.

  • Verify - Verify the protected data against a produced signature.

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 file. There are several ways to do this; NAGRA recommends adding it to your libs/ folder and using the excerpt below.

GROOVY
…
dependencies {
	…
    implementation fileTree(include: ['*.aar'], dir: 'libs')
	…
	// These are transitive dependencies needed by the SDK, but not included in our .AAR
    implementation "androidx.annotation:annotation:1.2.0"
    implementation "androidx.appcompat:appcompat:1.3.1"
	…
}
…
JavaScript errors detected

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

If this problem persists, please contact our support.