• Platforms
  • Partners
  • Forums
  • TLC Tealium Learning Center Tealium Learning
    Community
  • Discussions & Ideas Dicussions & Ideas
  • Product Guides Product Guides
  • Knowledge Base Knowledge Base
  • Developer Docs Developer Docs
  • Education Education
  • TLC Blog TLC Blog
  • Support Desk Support Desk
  • CDH Customer Data Hub Customer Data Hub

Table of Contents

  • Class: Tealium.Config
    • create()
    • enableConsentManager()
    • isConsentManagerEnabled()
    • setDatasourceId()
    • setForceOverrideLogLevel()
    • setOverrideCollectDispatchProfile()
    • setOverrideCollectDispatchUrl()
    • setOverrideVisitorServiceDomain()
    • setSecondsBeforeBatchTimeout()
ANDROID JAVA

Tealium.Config

Reference guide for Tealium.Config class and methods provided by Tealium for Android.

Class: Tealium.Config

The following summarizes the commonly used methods of the Tealium.Config class.

Method Description
create() Create instance of the Config object
enableConsentManager() Enable Consent Manager
isConsentManagerEnabled() Checks if Consent Manager is enabled
setDatasourceId() Sets the data source key
setForceOverrideLogLevel() Set to force a specific log level at init time
setOverrideCollectDispatchProfile() Overrides the Tealium Collect profile
setOverrideCollectDispatchUrl() Overrides the Tealium Collect URL
setOverrideVisitorServiceDomain() Overrides the Tealium Collect visitor service domain
setSecondsBeforeBatchTimeout() Sets the number of seconds before batch timeout

create()

Create instance of the Config object.

Tealium.Config config = Tealium.Config.create(
      application,
      account,
      profile,
      environment);

The Tealium Config instance is configured with the following parameters:

Parameters Type Description Example
application Application The application instance applicationObj
account String Tealium account name "companyXYZ"
profile String Tealium profile name "main"
environment String Tealium environment name ["dev", "qa", "prod"]

enableConsentManager()

Enable Consent Manager. This method is to be used before Tealium initialization.

public final String TEALIUM_INSTANCE = "main";
final Tealium.Config config = Tealium.Config.create(...);
config.enableConsentManager(TEALIUM_INSTANCE);
Parameter Type Description Example
instance String Tealium instance name "main"

isConsentManagerEnabled()

Checks if Consent Manager is enabled.

config.isConsentMangerEnabled()

setDatasourceId()

Sets the data source key.

config.setDataSourceId(dataSourceId);
Parameters Type Description Example
dataSourceId String Data source key (Set to null if none) "abc123"

setForceOverrideLogLevel()

Set to force a specific log level at init time. Returns instance of the config object for method chaining.

config.setForceOverrideLogLevel(forceOverrideLogLevel);

The following String options are available for forceOverrideLogLevel:

Log Level Description
"dev" Activity, Info, Warnings, and Errors
"qa" Info, Warnings, and Errors
"prod" Errors
"silent" None

setOverrideCollectDispatchProfile()

Overrides the Tealium Collect dispatch profile.

config.setOverrideCollectDispatchProfile(profile);
Parameters Type Description
profile String The Tealium Collect profile to override

setOverrideCollectDispatchUrl()

Overrides the Tealium Collect dispatch URL to send data to a different endpoint.

config.setOverrideCollectDispatchUrl(url);
Parameters Type Description
url String The URL to override

The default URL is:

https://collect.tealiumiq.com/event/

The default URL with event batching is:

https://collect.tealiumiq.com/bulk-event/

The method is typically used to set a custom hostname, or to set a specific region hostname. The following example sets the Tealium Collect base URL to stay within the EU Central region:

config.setOverrideCollectDispatchUrl("https://collect-eu-central-1.tealiumiq.com/event/");

setOverrideVisitorServiceDomain()

Overrides the Tealium Collect visitor service domain to send data to a different domain.

config.setOverrideVisitorServiceDomain(domain);
Parameters Type Description
domain String The visitor service domain to override

setSecondsBeforeBatchTimeout()

Sets the number of seconds before batch timeout. If the batch size limit has not been reached before reaching the timeout, the queued events are dispatched.

config.setSecondsBeforeBatchTimeout(timeout);
Parameters Type Description Example
timeout int The timeout, in seconds, for the batch to be sent. 30
Tealium
TealiumLocation

 
  • Mobile
  • Getting Started
    • Overview
    • Quick Start Guide
    • Mobile Concepts
    • Client-Side
    • Server-Side
    • Tracking Webviews
    • Data Layer
    • Consent Management
    • Event Batching
    • User Location and Geofencing
    • Deep Links
    • Timed Events
    • Trace
    • Hosted Data Layer
    • Feature Comparison
    • Troubleshooting
  • Remote Commands
    • Overview
    • How It Works
    • Integrations
      • AppsFlyer
      • Braze
      • Contentsquare
      • Facebook
      • Firebase
      • Kochava
      • Usabilla
  • Android (Java)
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • Consent Management
    • Module List
      • Ad Identifier Module
      • Crash Reporter Module
      • Install Referrer Module
      • Lifecycle Tracking Module
      • Location Module
      • Optimizely X Tracking Module
    • Android TV
    • Android Wear
    • API Reference
      • ConsentManager
      • DataSources
      • Lifecycle
      • Tealium
      • Tealium.Config
      • TealiumLocation
    • Release Notes
  • Android (Kotlin)
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • Identity Resolution
    • Module List
      • Collect Module
      • Collectors Module
      • Crash Reporter Module
      • Install Referrer Module
      • Lifecycle Tracking Module
      • Location Manager Module
      • Tag Management Dispatcher Module
      • Visitor Service Module
    • Android TV
    • API Reference
      • ConsentCategory
      • ConsentManager
      • CurrentVisit
      • DataLayer
      • Lifecycle
      • LocationManager
      • Tealium
      • TealiumConfig
      • VisitorProfile
      • VisitorService
    • Release Notes
  • Cordova
    • Overview
    • Install
    • Track
    • Data Management
    • Module List
      • Ad Identifier Module
      • Crash Reporter Module
      • Install Referrer Module
    • API Reference
    • Release Notes
  • Flutter
    • Overview
    • Install
    • Track
    • Consent Management
    • Data Management
    • API Reference
    • Release Notes
  • iOS (Objective-C)
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • Consent Management
    • Tag Management
    • Module List
      • Lifecycle Tracking Module
      • Optimizely X Tracking Module
    • tvOS
    • watchOS
    • API Reference
    • Release Notes
  • iOS (Swift) 1.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • App Extensions
    • Identity Resolution
    • Consent Management
    • Modules
    • Module List
      • AppData Module
      • Attribution Module
      • AutoTracking Module
      • Collect Module
      • Connectivity Module
      • CrashReporter Module
      • DataSource Module
      • DefaultStorage Module
      • Delegate Module
      • DeviceData Module
      • DispatchQueue Module
      • FileStorage Module
      • Lifecycle Module
      • Location Module
      • Logger Module
      • PersistentData Module
      • RemoteCommands Module
      • TagManagement Module
      • VisitorService Module
      • VolatileData Module
    • Feature Comparison
    • Working with Objective-C
    • API Reference
      • TealiumConfig
      • TealiumConsentCategories
      • TealiumConsentManagerDelegate
      • TealiumConsentManager
      • TealiumInstanceManager
      • TealiumPersistentData
      • TealiumVolatileData
      • Tealium
    • Release Notes
  • iOS (Swift) 2.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • App Extensions
    • Identity Resolution
    • Modules
    • Module List
      • AppData Module
      • Attribution Module
      • AutoTracking Module
      • Collect Module
      • Connectivity Module
      • CrashReporter Module
      • DeviceData Module
      • Lifecycle Module
      • Location Module
      • RemoteCommands Module
      • TagManagement Module
      • VisitorService Module
    • Working with Objective-C
    • API Reference
      • Tealium
      • TealiumConfig
      • TealiumConsentCategories
      • TealiumConsentManager
      • TealiumDataLayer
      • TealiumInstanceManager
    • Release Notes
  • React Native
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • Unity
    • Overview
    • Install
    • Track
    • API Referencee
  • Xamarin
    • Overview
    • Install
    • Track
    • Data Management
    • Consent Management
    • API Reference
    • Release Notes
  • Web
  • AMP
    • Overview
    • Install
    • Track
    • Data Layer
  • Angular
    • Overview
    • Install
    • Track
    • API Reference
  • Google Tag Manager
    • Overview
    • Install
    • Data Layer
  • JavaScript (Web)
    • Overview
    • Install
    • Track
    • Data Layer
    • Universal Data Object (utag_data)
    • Universal Tag (utag.js)
    • Data Layer Object (b)
    • Single-Page Applications
    • Settings
    • Debugging
    • API Reference
      • Cookie Functions
      • GDPR Functions
      • Tracking Functions
      • Utility Functions
    • Release Notes
  • Server
  • C#
    • Overview
    • Install
    • Track
    • Data Layer
    • API Reference
    • Release Notes
  • HTTP API
    • Overview
    • Endpoint
    • Data Layer
  • Java
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • Node
    • Overview
    • Install
    • Track
    • API Reference
  • Python
    • Overview
    • Install
    • Track
    • API Reference
  • Roku
    • Overview
    • Install
    • Track
    • API Reference
  • Ruby
    • Overview
    • Install
    • Track
    • API Reference

Was this article helpful?

This page was last updated: October 20, 2020       Thank you for your feedback!
  • Platforms
  • Partners
  • Forums
  • Mobile
  • Getting Started
  • Remote Commands
  • Android (Java)
  • Android (Kotlin)
  • Cordova
  • Flutter
  • iOS (Objective-C)
  • iOS (Swift) 1.x
  • iOS (Swift) 2.x
  • React Native
  • Unity
  • Xamarin
  • Web
  • AMP
  • Angular
  • Google Tag Manager
  • JavaScript (Web)
  • Server
  • C#
  • HTTP API
  • Java
  • Node
  • Python
  • Roku
  • Ruby