buildSdkConfiguration
Builder function to create an SdkConfiguration for online-only usage.
Return
An instance of SdkConfiguration configured for online-only usage.
Parameters
The application context.
Your TomTom API key.
A suspend function that provides the initial UserConsent for telemetry. In some jurisdictions, enabling the collection of TomTom Telemetry data comes with specific legal requirements. Application developers must consult applicable regulations before enabling TomTom telemetry collection.
The country code in the ISO 3166-1 alpha-3 format whose view on disputed areas should be used. Defaults to DEFAULT_GEOPOLITICAL_VIEW.
Lambda to configure core settings via CoreConfiguration.Builder2. Allows configuration of telemetry user consent and location interceptor.
Lambda to configure cache storage settings via CacheStorageConfiguration.Builder. Allows configuration of the directory path for cache storage.
Throws
if the cache storage directory path is not absolute or cannot be created.
Deprecated
This will be removed from future releases after 2026-10-07.
Replace with
buildSdkConfiguration(context, apiKey, { UserConsent.TelemetryOn }, geopoliticalView, coreConfiguration, cacheStorageConfiguration)Builder function to create an SdkConfiguration for online-only usage.
Return
An instance of SdkConfiguration configured for online-only usage.
Parameters
The application context.
Your TomTom API key.
The country code in the ISO 3166-1 alpha-3 format whose view on disputed areas should be used. Defaults to DEFAULT_GEOPOLITICAL_VIEW.
Lambda to configure core settings via CoreConfiguration.Builder. Allows configuration of telemetry user consent and location interceptor.
Lambda to configure cache storage settings via CacheStorageConfiguration.Builder. Allows configuration of the directory path for cache storage.
Throws
if the cache storage directory path is not absolute or cannot be created.