-
public final class ConfigurationBuilder extends Configuration
Builder for creating Android Configuration instances without depending on the constructor signature.
This subtype preserves binary compatibility for previously compiled
ConfigurationDSL lambdas: the new builder-backed DSL still passes an object that is-a Configuration.Kotlin usage:
Amplitude("api-key", applicationContext) { autocapture = setOf(AutocaptureOption.SESSIONS) minTimeBetweenSessionsMillis = 10000 }Java usage:
ConfigurationBuilder builder = new ConfigurationBuilder("api-key", context); builder.setAutocapture(Collections.singleton(AutocaptureOption.SESSIONS)); Amplitude amplitude = new Amplitude(builder.build());
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConfigurationBuilder(String apiKey, Context context)
-
Method Summary
-
-
Method Detail
-
getAutocapture
final Set<AutocaptureOption> getAutocapture()
-
setAutocapture
final Unit setAutocapture(Set<AutocaptureOption> autocapture)
-
getTrackingSessionEvents
final Boolean getTrackingSessionEvents()
-
setTrackingSessionEvents
final Unit setTrackingSessionEvents(@Deprecated(message = Please use 'autocapture' instead and set 'AutocaptureOptions.SESSIONS' to enable the option.) Boolean trackingSessionEvents)
-
getDefaultTracking
final DefaultTrackingOptions getDefaultTracking()
-
setDefaultTracking
final Unit setDefaultTracking(@Deprecated(message = Please use 'autocapture' instead, replaceWith = @ReplaceWith(imports = {}, expression = autocapture)) DefaultTrackingOptions defaultTracking)
-
getContext
final Context getContext()
-
getFlushQueueSize
Integer getFlushQueueSize()
-
setFlushQueueSize
Unit setFlushQueueSize(Integer flushQueueSize)
-
getFlushIntervalMillis
Integer getFlushIntervalMillis()
-
setFlushIntervalMillis
Unit setFlushIntervalMillis(Integer flushIntervalMillis)
-
getInstanceName
String getInstanceName()
-
setInstanceName
Unit setInstanceName(String instanceName)
-
getStorageProvider
StorageProvider getStorageProvider()
-
setStorageProvider
Unit setStorageProvider(StorageProvider storageProvider)
-
getLoggerProvider
LoggerProvider getLoggerProvider()
-
setLoggerProvider
Unit setLoggerProvider(LoggerProvider loggerProvider)
-
getMinIdLength
Integer getMinIdLength()
-
setMinIdLength
Unit setMinIdLength(Integer minIdLength)
-
getPartnerId
String getPartnerId()
-
setPartnerId
Unit setPartnerId(String partnerId)
-
getCallback
<ERROR CLASS> getCallback()
-
setCallback
Unit )>setCallback(<ERROR CLASS> callback)
-
getFlushMaxRetries
Integer getFlushMaxRetries()
-
setFlushMaxRetries
Unit setFlushMaxRetries(Integer flushMaxRetries)
-
getUseBatch
Boolean getUseBatch()
-
setUseBatch
Unit setUseBatch(Boolean useBatch)
-
getServerZone
ServerZone getServerZone()
-
setServerZone
Unit setServerZone(ServerZone serverZone)
-
getServerUrl
String getServerUrl()
-
setServerUrl
Unit setServerUrl(String serverUrl)
-
getPlan
Plan getPlan()
-
getIngestionMetadata
IngestionMetadata getIngestionMetadata()
-
setIngestionMetadata
Unit setIngestionMetadata(IngestionMetadata ingestionMetadata)
-
getUseAdvertisingIdForDeviceId
final Boolean getUseAdvertisingIdForDeviceId()
-
setUseAdvertisingIdForDeviceId
final Unit setUseAdvertisingIdForDeviceId(Boolean useAdvertisingIdForDeviceId)
-
getUseAppSetIdForDeviceId
final Boolean getUseAppSetIdForDeviceId()
-
setUseAppSetIdForDeviceId
final Unit setUseAppSetIdForDeviceId(Boolean useAppSetIdForDeviceId)
-
getNewDeviceIdPerInstall
final Boolean getNewDeviceIdPerInstall()
-
setNewDeviceIdPerInstall
final Unit setNewDeviceIdPerInstall(Boolean newDeviceIdPerInstall)
-
getTrackingOptions
final TrackingOptions getTrackingOptions()
-
setTrackingOptions
final Unit setTrackingOptions(TrackingOptions trackingOptions)
-
getEnableCoppaControl
final Boolean getEnableCoppaControl()
-
setEnableCoppaControl
final Unit setEnableCoppaControl(Boolean enableCoppaControl)
-
getLocationListening
final Boolean getLocationListening()
-
setLocationListening
final Unit setLocationListening(Boolean locationListening)
-
getFlushEventsOnClose
final Boolean getFlushEventsOnClose()
-
setFlushEventsOnClose
final Unit setFlushEventsOnClose(Boolean flushEventsOnClose)
-
getMinTimeBetweenSessionsMillis
final Long getMinTimeBetweenSessionsMillis()
-
setMinTimeBetweenSessionsMillis
final Unit setMinTimeBetweenSessionsMillis(Long minTimeBetweenSessionsMillis)
-
getIdentifyBatchIntervalMillis
Long getIdentifyBatchIntervalMillis()
-
setIdentifyBatchIntervalMillis
Unit setIdentifyBatchIntervalMillis(Long identifyBatchIntervalMillis)
-
getIdentifyInterceptStorageProvider
StorageProvider getIdentifyInterceptStorageProvider()
-
setIdentifyInterceptStorageProvider
Unit setIdentifyInterceptStorageProvider(StorageProvider identifyInterceptStorageProvider)
-
getIdentityStorageProvider
IdentityStorageProvider getIdentityStorageProvider()
-
setIdentityStorageProvider
Unit setIdentityStorageProvider(IdentityStorageProvider identityStorageProvider)
-
getMigrateLegacyData
final Boolean getMigrateLegacyData()
-
setMigrateLegacyData
final Unit setMigrateLegacyData(Boolean migrateLegacyData)
-
getOffline
Boolean getOffline()
-
setOffline
Unit setOffline(Boolean offline)
-
getDeviceId
String getDeviceId()
-
setDeviceId
Unit setDeviceId(String deviceId)
-
getSessionId
Long getSessionId()
-
setSessionId
Unit setSessionId(Long sessionId)
-
getHttpClient
HttpClientInterface getHttpClient()
-
setHttpClient
Unit setHttpClient(HttpClientInterface httpClient)
-
getInteractionsOptions
final InteractionsOptions getInteractionsOptions()
-
setInteractionsOptions
final Unit setInteractionsOptions(InteractionsOptions interactionsOptions)
-
getEnableDiagnostics
Boolean getEnableDiagnostics()
-
setEnableDiagnostics
Unit setEnableDiagnostics(Boolean enableDiagnostics)
-
getEnableRequestBodyCompression
Boolean getEnableRequestBodyCompression()
-
setEnableRequestBodyCompression
Unit setEnableRequestBodyCompression(Boolean enableRequestBodyCompression)
-
getEnableAutocaptureRemoteConfig
final Boolean getEnableAutocaptureRemoteConfig()
-
setEnableAutocaptureRemoteConfig
final Unit setEnableAutocaptureRemoteConfig(Boolean enableAutocaptureRemoteConfig)
-
build
final Configuration build()
-
-
-
-