Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.barriers/Barriers/connectivity

connectivity

@JvmOverloads
fun connectivity(enforcedSettings: (ConnectivityBarrierSettingsBuilder) -> ConnectivityBarrierSettingsBuilder? = { it }): BarrierFactory

Returns the BarrierFactory for creating the "ConnectivityBarrier". Use this barrier to only dispatch events when connectivity is required.

By default, this barrier is active and scoped to Collect module. You can call the following method to programmatically change the scope (or other barrier settings), or you can use local/remote settings configuration instead.

config.addBarrier(Barriers.connectivity { enforcedSettings ->
enforcedSettings.setScopes(emptySet()) // setting empty scopes deactivates the barrier
})
Content copied to clipboard

Parameters

enforcedSettings

A function that takes a ConnectivityBarrierSettingsBuilder and returns a configured builder. Used to provide programmatic settings that will be enforced and remain constant during the lifecycle of the Barrier. Other settings will still be affected by Local and Remote settings and updates.

Generated by Dokka
(c) Tealium 2026