Telemetry configuration

VERSION 1.1.0
PUBLIC PREVIEW

The Navigation SDK can send telemetry data to TomTom. This helps us improve the SDK user experience. The Telemetry module allows the configuration of data collection.

When enabled, the module will collect the following information from the SDK:

  • GNSS coordinates of the vehicle or device when the user drives with TomTomNavigation started.
  • The type of vehicle and its relevant parameters for route calculation when the user drives with TomTomNavigation started.

In this guide, you will learn how to configure the Telemetry module and adjust the user consent level.

Project Setup

Configure the project as described in the Project setup guide. Then add the following dependencies to the build.gradle.kts file of your application module and synchronize the project as shown in the following example:

1val version = "1.1.0"
2implementation("com.tomtom.sdk.telemetry:telemetry-config-provider-default:$version")
3implementation("com.tomtom.sdk.telemetry:telemetry-default:$version")

Basic configuration

You can use the Telemetry object to configure what telemetry data the SDK sends. Initialize the Telemetry object before you start the TomTomNavigation. To initialize the Telemetry object, you must provide an instance of DefaultTelemetryConfigProvider, set with the API key.

Telemetry.initialize(DefaultTelemetryConfigProvider(context, "TOMTOM_API_KEY"))

Telemetry initialization can only be done once. Every subsequent attempt to initialize the Telemetry is ignored.

You can enable or disable data collection for an end user by setting the userConsent property. Currently, there are two valid consent levels that can be assigned to this property:

null causes the SDK to not send any telemetry data. This is the default value.

Pseudonymized causes the SDK to send the telemetry data with no personal or billing information. The data allows TomTom to identify the user. For example, given a user, TomTom can tell what routes they took. However, TomTom can’t link personal or billing data with the user.

Telemetry.userConsent = Consent.Pseudonymized

Unless agreed differently in the contract, we ask our customers to only enable an end user to use the Traffic services if the user simultaneously consents to the telemetry data collection.

Next steps

Since you have learned how to configure Telemetry, here are recommendations for the next steps: