buildSdkConfiguration

fun buildSdkConfiguration(context: Context, apiKey: String, geopoliticalView: String = DEFAULT_GEOPOLITICAL_VIEW, coreConfiguration: CoreConfiguration.Builder.() -> Unit = {}, cacheStorageConfiguration: CacheStorageConfiguration.Builder.() -> Unit = {}): SdkConfiguration

Factory method to create an SdkConfiguration for online-only usage.

Return

An instance of SdkConfiguration configured for online-only usage.

Parameters

context

The application context.

apiKey

Your TomTom API key.

geopoliticalView

The country code in the ISO 3166-1 alpha-3 format whose view on disputed areas should be used. Defaults to DEFAULT_GEOPOLITICAL_VIEW.

coreConfiguration

Lambda to configure core settings via CoreConfiguration.Builder. Allows configuration of telemetry user consent and location interceptor.

cacheStorageConfiguration

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.