Telemetry configuration

VERSION 1.15.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.

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.15.0"
2implementation("com.tomtom.sdk.telemetry:telemetry-config-provider-default:$version")
3implementation("com.tomtom.sdk.telemetry:telemetry:$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(context, 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.

None results in the SDK sending no telemetry data. This is the default value.

Anonymized results in the SDK sending only anonymous telemetry data.

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.

Personalized results in the SDK sending the telemetry data, including any available personal or billing information.

Telemetry.userConsent = Consent.Personalized

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: