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 paths for cache storage and the local map display assets.
Throws
if the cache storage directory path is not absolute or cannot be created.
Builder function to create an SdkConfiguration for online-first usage with offline capabilities.
Return
An instance of SdkConfiguration configured for online-first usage with offline capabilities.
Parameters
The application context.
Your TomTom API key.
The local path to the region store directory. That is the directory that contains the file: ROOT.NDS.
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 paths for cache storage and the local map display assets.
Lambda to configure region store settings. Allows configuration of keystore path, keystore password, and region store update settings via RegionStoreConfiguration. The region store created with this configuration can be retrieved later via com.tomtom.sdk.init.TomTomSdk.getOfflineRegionStore.
Throws
if the regionStorePath or keyStorePath (when provided) 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 paths for cache storage and the local map display assets.
Throws
if the cache storage directory path is not absolute or cannot be created.