HERE Android SDK Developer's Guide

Authenticating Applications

Developers using the HERE SDK with their app are required to register for a set of HERE credentials and to specify these credentials (App_Id, App_Code, and licenseKey) in their app's Android manifest XML file. Failure to do so results in blocked access to certain features and degradation in the quality of other services.

To obtain these credentials, visit the developer portal at https://developer.here.com/?create=Evaluation and register for a free Evaluation license. Once your project is created, you can generate these credentials on your Project Details page. If you already have a commercial (public or business) plan, you can also retrieve these credentials from your Project Details page.

Note: Credentials are unique to your application's package. Do not reuse credentials across multiple applications.
Important: When switching from an Evaluation plan to a commercial plan, new HERE credentials must be taken into use. Applications must not be commercially released (such as submitted to a store) using a license key obtained as part of an Evaluation plan. Once you have upgraded to a commerical license, you need to obtain your new license key on the Project Details page, add it to your app, and re-deploy your app. Please contact HERE for further information.

Adding Credentials to the Manifest

You can add your HERE credentials as <meta-data/> attributes to the AndroidManifest.xml file as follows:

  1. In your development environment, double-click your project's AndroidManifest.xml file and ensure that you are viewing the file in text editor mode.
  2. Within the <application></application> block of tags, add the following markup directly beneath the <activity></activity> tag:
    <meta-data android:name="com.here.android.maps.appid"
    android:value="{YOUR_APP_ID}"/>
    <meta-data android:name="com.here.android.maps.apptoken"
    android:value="{YOUR_APP_CODE}"/>
    <meta-data android:name="com.here.android.maps.license.key"
    android:value="{YOUR_LICENSE_KEY}"/>
  3. Replace {YOUR_APP_ID}, {YOUR_APP_CODE} and {YOUR_LICENSE_KEY} with the appropriate credentials for your application.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.mapstutorial.livesightradar"
  android:versionCode="1"
  android:versionName="1.0">

  <uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="16" />

  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

  <!-- Additional permission for LiveSight -->
  <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
  <uses-permission android:name="android.permission.CAMERA" />

  <application
    android:icon="@drawable/icon"
    android:label="@string/app_name" >

    <activity
      android:name="com.mapstutorial.livesightradar.LiveSightRadarActivity"
      android:label="@string/app_name" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>

    <meta-data
      android:name="com.here.android.maps.appid"
      android:value="{YOUR_APP_ID}" />
    <meta-data
      android:name="com.here.android.maps.apptoken"
      android:value="{YOUR_APP_CODE}" />
    <meta-data
      android:name="com.here.android.maps.license.key"
      android:value="YOUR_LICENSE_KEY" />
  </application>
</manifest>