Authenticating Applications

Developers using Live Sense SDK with their app are required to register for a set of HERE credentials and to specify these credentials in the SDK.

To obtain HERE credentials, visit the developer portal at https://developer.here.com/plans and register for a license.

Once your project is created, you can generate these credentials on your Project Details page. If you already have a plan, you can also retrieve these credentials from your Project Details page.

Note

Credentials are unique to your account and your application's package namespace. Avoid reusing credentials across multiple applications.

It is important to take new HERE credentials when switching from an Evaluation plan to a Commercial plan.

Note

You cannot commercially release applications (for example, submit your application to a store) with a license key obtained as part of an Evaluation plan.

Once you have upgraded to a Commercial license, you must take the following steps:

  1. Obtain your new license key on the Project Details page.
  2. Add this license key to your app.
  3. Re-deploy your app.

To contact us for more details, see Service Support.

Add Credentials to the Manifest

To add your HERE credentials as <meta-data/> attributes to the AndroidManifest.xml file, follow these steps:

  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.see.livesense.appid"
     android:value="{YOUR_APP_ID}"/>
     <meta-data android:name="com.here.see.livesense.apptoken"
     android:value="{YOUR_APP_CODE}"/>
     <meta-data android:name="com.here.see.livesense.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.here.android.tutorial">

  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  <application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:hardwareAccelerated="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
      <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.see.livesense.appid"
      android:value="{YOUR_APP_ID}" />
    <meta-data
      android:name="com.here.see.livesense.apptoken"
      android:value="{YOUR_APP_CODE}" />
    <meta-data
      android:name="com.here.see.livesense.license.key"
      android:value="{YOUR_LICENSE_KEY}" />
  </application>

</manifest>

Data is collected only from users who have agreed to their data being shared with HERE.

To obtain end-user consent for data usage and collection, use the following method:

liveSenseEngine.requestConsent(this, new LiveSenseEngine.LSDConsentCallback() { ->
   //callbacks
 }

This method will show an Alert-Dialog pop-up that requests permission from the end-user to collect data and share that data with HERE.

After establishing this, you can start with the basic usage of the Live Sense in your app.

results matching ""

    No results matching ""