Skip to main content

Permissions & auth

Contents

Contact us to learn more about licensing the CoPilot Native Nav SDK.

Permissions

In order for the SDK to function and for users to get the navigation experience, certain permissions are required prior to use. Location permissions are required for the routing itself, whereas access to the storage system is needed for caching the map data to the device. Permissions should be added in AndroidManifest.xml under the manifests folder.

You will need to request the following permissions prior to using the SDK:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

The user’s location permission should be checked during runtime using the PermissionsManager.

Android provides a guide to requesting permissions from users as well as details on location access.

Authentication

Authentication is done by providing your API key, Company ID and Asset ID to the authentication module. You can also just license particular features for use with the current session.

Authentication needs to be done prior to invoking the CoPilot Native Nav SDK.

Behind the scenes this will authenticate the current device/app/user for navigation, as well as connect to our web tools, such as Account Manager.

Pay particular attention to the last line of the code above, which needs to be called after authentication has completed.

TrimbleMaps.getInstance(this);

When integrating with our services, it is important to account for potential licensing failures that may occur due to various reasons. To ensure reliable operation and avoid unnecessary API calls that may fail due to licensing issues, we recommend implementing a safety check in your integration.

With this complete, the CoPilot Native Nav SDK is ready to be used. Now, let’s navigate.

Last updated March 28, 2025.
Contents