Getting Started

Overview

The sky’s the limit when it comes to the potential for unmanned aircraft. The AirMap SDK for Android allows developers to authenticate with AirMap, create/manage a pilot profile, create/manage flights, send telemetry data & get real-time traffic alerts.

Requirements

1. Sign up for an AirMap Developer Account.

https://developers.airmap.com/docs/introduction

2. Download an AirMap Configuration File

From the AirMap Developer portal, within your Application Settings, scroll down to Config JSON, and download the airmap.config.json file to add to your application.

WARNING

If you are using the Login UI from the SDK, then you must set a Callback URL.

You can add the callback URL in the developer portal under your Application settings.

MapBox Api Key

The Create Flight UI uses the MapBox GL Native SDK. Please request a MapBox Access Token: https://www.mapbox.com/ios-sdk/#access_tokens

You can add this key to your airmap.config.json file.

Setup

Upgrading from 1.0.2

If upgrading from version 1.0.2, you may need to re-import some classes

Start by adding the Android SDK to your project:

  • Add compile('com.airmap.airmapsdk:airmapsdk:1.0.6') { exclude module: 'support-v4' }
    to your module-level build.gradle file
Module-level `build.gradle` file

Module-level build.gradle file

  • Add maven { url "https://jitpack.io" } to your application-level build.gradle file in the allprojects.repositories block
App-level `build.gradle` file

App-level build.gradle file

Place the airmap.config.json file that you previously downloaded inside your /assets directory. If you don't already have an assets directory, create it. It should be at the same level in the file structure as your java and res directories.

The location of the `airmap.config.json` file

The location of the airmap.config.json file

Now, initialize the SDK in your Activity or Application. The SDK will get your API key from the config file that was added to the project.

AirMap.init(MainActivity.this);

Auth Token

If the user has not logged in yet, the auth parameter can be omitted

Getting Started