Skip to content

Installation (Android)

To use the SDK, you have to integrate the library files in your app, then call the respective API.

Requirements

You need Android SDK 24 or later to run the SDK.

The SDK supports Android Media3 ExoPlayer, with support for DASH and HLS playlists (live or VoD), and the following video codecs:

  • H.264
  • H.265
  • VP9
  • AV1

Download

Download the SDK from the links you have been sent, and extract them locally. The extracted folder should look like this:

.
├── LICENSE.md
├── README_SDK.md
├── docs/
├── surfmeteranalytics
│   └── surfmeteranalytics/…
└── surfmeteranalytics_demo-$version-$customer.zip

The docs contain the JavaDoc API docs, which you may find useful. The surfmeteranalytics folder contains the actual SDK library files. In the surfmeteranalytics_demo-$version-$customer.zip file, you will find the demo app source code.

Integration into your Android project

The actual SDK is contained in the surfmeteranalytics/surfmeteranalytics folder as a Maven package.

First, copy the surfmeteranalytics folder to your app folder. For instance, your Android project may look like this:

.
├── app
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src (your Android app source code)
├── build.gradle
├── gradle
│   └── wrapper
├── gradle.properties
├── gradlew
├── gradlew.bat
├── local.properties
├── poc_use_aar.patch
└── settings.gradle

Place the surfmeteranalytics folder in the app folder, so that it looks like this:

.
├── app
│   ├── build.gradle
│   ├── proguard-rules.pro
│   ├── src (your Android app source code)
│   └── surfmeteranalytics (our SDK library)
...

Updating Gradle settings

Then modify settings.gradle in your root folder as follows, to add the SDK as a local Maven repository:

dependencyResolutionManagement {
    repositories {
        // surfmeteranalytics local repo
        maven {
            url = "file://" + file('app/surfmeteranalytics')
        }
        google()
        mavenCentral()
    }
}

Note

If you use Gradle < 6.8, you may need to add the following to your app/build.gradle instead of the dependencyResolutionManagement block:

repositories{
    maven {
        url uri("${rootProject.projectDir}/app/surfmeteranalytics")
    }
}

In your app's build.gradle, add the following to the dependencies block:

implementation 'com.aveq:surfmeteranalytics:$version'

Replace $version with the version number of the SDK that you were provided with, e.g. 1.2.0.

The com.aveq.surfmeteranalytics package should now be available to your application for importing.

Once you have added the SDK to your project, you can start using it.

Updating the SDK

To update the SDK at a later stage, you can download the latest version from the AVEQ portal, and repeat the steps above. In particular, you need to:

  • Update the surfmeteranalytics folder to the new SDK version
  • Update the version in the build.gradle file