Get Started with the Android SDK

The Meridian Android SDK has all the tools you'll need to build your own Meridian-powered app.

Once you've added maps, routes, placemarks, and campaigns to the Meridian Editor, you can use the Meridian SDK to integrate that content into your Meridian-powered Android app.

Go here for the Meridian Android SDK Reference documentation.

Click here to download the Android SDK.

Once you've downloaded the SDK, be sure to open the README.md file. It explains how to get started.

The Meridian Samples App

The Meridian Samples app is included with the Android SDK to demonstrate common Meridian features and workflows.

Add the SDK to Your Project

In order to simplify using the Meridian SDK library with your Android project, we've bundled our SDK code into a binary distribution of the Android Library Project (AAR) file.

The Meridian SDK supports devices with Android 5.0+ (Lollipop) API Level 21 and higher.

Add the AAR Relative Path

Complete these steps to add the AAR file to your Android project.

  1. Choose a location for meridian-x.y.z.aar.

  2. Edit your app's build.gradle file to add the relative path to the meridian-x-y-z.aar file location inside flatDir { }, where our app will look for dependencies. Into repositories { }, insert:

    repositories {
        jcenter()
        google()
        // Tell gradle to look in our parent directory for the meridian AAR package.
        flatDir {
            dirs '[relative file path to the AAR directory]'
        }
    }

Add Dependencies

To use the Meridian SDK classes in your project, add the compile information for the dependencies to the build.gradle file. These are the meridian-x.y.z.aar file and two required external dependencies.

To find the project's current dependencies, look in build.gradle in the MeridianSamples directory.

In the build.gradle file inside dependencies { }, insert compile for the meridian-x.y.z.aar file and the two required external dependencies:

    dependencies {

        implementation 'com.arubanetworks.meridian:meridian:x.y.z@aar'

        // Google Support Libraries
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'androidx.appcompat:appcompat:1.0.2'
        // Required for GPS on newer Android devices.
        implementation 'com.google.android.gms:play-services-location:17.0.0'

        // The SDK also has two external dependencies that you'll need to include:
        implementation 'com.android.volley:volley:1.1.0'
        implementation 'com.squareup:otto:1.3.8'
    }

Import Packages

When this is done, you'll be able to import the com.arubanetworks.meridian packages to your project and use Meridian classes in your source files.

The SDK's MeridianSamples/app project folder has an example of what the finished build.gradle file should look like.

Add Permissions

To enable the Meridian SDK's location-awareness features, add the following permissions to your project's AndroidManifest.xml file:

<!-- For using GPS and Location in general -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<!-- For using location derived from bluetooth beacons -->
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

Configure the SDK

Before you can use the features of the Meridian SDK, you'll need to create an instance of MeridianConfig. This will configure the SDK.

Put the following line in the onCreate method of your Application class or main activity.

    // Configure Meridian
    Meridian.configure(this);