Skip to main content
All About Adori Android SDK

From A - Z, everything you need to know for setup

A
Written by Adori Support
Updated over a week ago

Introduction

Integrate Adori Android SDK into existing Android apps to enable detection and display of Adori's interactive experiences ("Adori Tags") that were embedded into the audio by the content owner using Adori Studio.

First Things First

  • Install or update Android Studio to its latest version.

  • Make sure that your app meets the following requirements:

    • Targets API level 21 (Lollipop) or later.

    • Uses Exoplayer version 2.12.0 and above. If your app is using Exoplayer version 2.11.8 and below, please contact Adori Support for technical assistance

    • Set up a device or emulator for running your app.

    • JDK version 8.

Let's Roll!

If you don't have an Android app, you can download a sample project.

Add the Adori SDK

Step 1: Update dependencies

In your project-level build.gradle, add adori-services version 2.0.0 or later, then add the Adori repositories and dependency:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
buildscript { repositories { google() // Add Adori's Maven repository. maven { url "https://maven.adorilabs.com/artifactory/gradle-release" } } dependencies { // ... // Add the Adori Services plugin (check for v2.0.0 or higher). classpath 'com.adorilabs.sdk.android:adori-sdk-plugin:2.0.0' } } allprojects { // ... repositories { // Check that Adori's Maven repository is included (if not, add it). maven { url "https://maven.adorilabs.com/artifactory/gradle-release" } // ... } }

In your app-level build.gradle, add the Adori dependencies version 2.1.5:

1 2 3 4 5 6 7 8 9
apply plugin: 'com.android.application' // Add the Adori plugin. apply plugin: 'com.adorilabs.sdk.android' dependencies { // ... // Add the Adori dependency. implementation 'com.adorilabs.sdk.android:adori:2.1.5' }

Step 2: Add config file

  • Download sdk config file from Adori Studio dashboard. If you are unable to download, please contact Support

  • Rename the downloaded config file to adori-sdk-app.json.

  • Move your config file into the module (app-level) directory of your app.

Info

Config file must be named adori-sdk-app.json

Step 3: Update default config

  • Update defaultConfig in the (app-level) build.gradle to add these ndk abi filters.

    1 2 3 4 5
    defaultConfig { ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } }

Warning!!

Note that the Adori SDK currently supports these architectures only.

Step 4: Java 8 support

  • Turn on Java 8 support in the (app-level) build.gradle

    1 2 3 4 5
    // ... compileOptions { targetCompatibility JavaVersion.VERSION_1_8 } // ...

Step 5: Update Proguard Rules

Make sure you add this to your proguard-rules.pro :

1
-keep class com.adorilabs.** {*; }

Step 6: Sync your app

Sync your app to ensure that all dependencies have the necessary versions.

Did this answer your question?