- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
07-06-2023 05:32 AM
07-06-2023 11:28 AM
Here is the code:
import com.tealium.collect.TealiumConfig fun main(args: Array<String>) { // Create a TealiumConfig object val config = TealiumConfig() // Disable batch events config.batchEvents = false // Initialize Tealium Collect val tealium = Tealium(config) // Track an event tealium.track("event1") }
This code will disable batch events for Tealium Collect. This means that events will be sent to Tealium immediately, instead of being batched together and sent later.
07-06-2023 11:57 PM
07-10-2023 10:56 AM
Hi!
I apologize for the inconvenience. The batchEvents function was deprecated in Tealium Collect 2.5.0. You can now use the flushInterval function to control the frequency at which events are sent to Tealium.
Here is the updated code:
import com.tealium.collect.TealiumConfig
fun main(args: Array<String>) {
// Create a TealiumConfig object
val config = TealiumConfig()
// Set the flush interval to 15 seconds
config.flushInterval = 15000
// Initialize Tealium Collect
val tealium = Tealium(config)
// Track an event
tealium.track("event1")
}
This code will set the flush interval to 15 seconds. This means that events will be sent to Tealium every 15 seconds.
I hope this helps! Let me know if you have any other questions.
07-13-2023 04:24 AM
Hi Shivam,
I can't see any function "flushInterval" for Tealium Collect on Kotlin.
My library versions:
//CORE SDK implementation 'com.tealium:kotlin-core:1.5.3' //VISITOR SERVICE MODULE implementation 'com.tealium:kotlin-visitor-service:1.1.1' //LIFECYCLE MODULE implementation 'com.tealium:kotlin-lifecycle:1.1.1' //COLLECT MODULE/DISPATCHER implementation 'com.tealium:kotlin-collect-dispatcher:1.1.0' implementation 'com.tealium:kotlin-tagmanagement-dispatcher:1.2.0' implementation 'com.tealium:kotlin-remotecommand-dispatcher:1.2.0' implementation 'com.tealium:remotecommands:1.0.1'
My Tealium Config, configuration:

Regards
07-18-2023 05:50 AM
val config = TealiumConfig()
config.flushIntervalMillis = 10000
Tealium.initialize(config)
Try This
07-20-2023 01:32 AM
Copyright All Rights Reserved © 2008-2023