Document Navigation SDK for Android Get Started

Get Started

This guide describes the steps required to use the Navigation SDK, providing an overview to help you get started quickly.

Step 1: Get a Key

For details, see Get a Key.

Step 2: Integrate and Deploy

Choose one of the following methods:

Automatic Deployment

Manual Deployment

Step 3: Configure Location Permissions

For details, see Location Permissions.

Step 4: Configure the Key

Configure the AMAP Key obtained in Step 1 in your code to ensure navigation functions work correctly. Use one of the following two methods.

Method 1: Configure in AndroidManifest.xml

Add the following <meta-data> element inside the <application> tag in AndroidManifest.xml:

<meta-data
    android:name="com.amap.api.v2.apikey"
    android:value="Your Key" />

Method 2: Configure Programmatically

Call the setApiKey method before using any other Navigation SDK APIs. This is a static method and should be called before any navigation interface, typically in the Application class.

/**
 * Manually sets the API key.
 * This is a static method and must be called before any navigation API calls.
 * It is recommended to call this in the Application class.
 *
 * @param context The application Context.
 * @param apiKey  The API key obtained from the AMap developer console.
 */
public static void setApiKey(Context context, String apiKey)

Step 5: Plan a Route

For details, see Driving Routing.

Step 6: Start Navigation

For details, see Real-Time Navigation / Simulated Navigation.