Telemetry configuration

VERSION 0.32.0

Navigation SDK can send telemetry data to TomTom. We use the telemetry data to improve the SDKs' user experience. You can use the Telemetry module to configure what telemetry data is sent.

Project Setup

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

1dependencies {
2 def version = "0.32.0"
3 implementation "com.tomtom.sdk.telemetry:telemetry-api:$version"
4 implementation "com.tomtom.sdk.telemetry:telemetry-default:$version"

Basic configuration

You can use the Telemetry object to configure what telemetry data the SDK will send. To create the Telemetry object, you need to set the API key. To make the SDK use the object, pass it to the navigation configuration constructor (e.g., Configuration):

1val telemetry: Telemetry = DefaultTelemetry.create(context, "TOMTOM_API_KEY")
2val navigationConfiguration = OnlineConfiguration(
3 context,
4 apiKey = "TOMTOM_API_KEY",
5 locationProvider = locationProvider,
6 routeReplanner = routeReplanner,
7 telemetry = telemetry

You can create only one Telemetry object. Every other call to create throws an exception.

Set the consent level to configure what telemetry data the SDK sends. There are two consent levels:

null causes the SDK to send no 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 any personal or billing data with the user.

To set the consent level, assign a value to a userConsent property:

telemetry.userConsent = Telemetry.Consent.Pseudonymized

Custom Transport layer

By default, the SDK sends the telemetry data to TomTom. To change that, create the Telemetry object with your implementation of the Transport interface:

1val telemetry: Telemetry = DefaultTelemetry.create(object : Transport {
2 override fun post(data: ByteArray) {
3 // Implement with your code
4 }

The telemetry data passed to the Transport interface are serialized SENSORIS Protocol buffer messages. In the snippet above, data contains a DataMessages message.

Collected data

This is the complete list of the telemetry data TomTom collects from Navigation SDK:

  • GNSS coordinates of the vehicle or device when the user drives with TomTomNavigation started.

Next steps

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

Navigation use case

A tutorial showing how to build a complete application with the TomTom navigation.

Logging location traces

Record and parse location traces.

Location tracking

Match the location provided by the to the route.