Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.network/NetworkUtilities

NetworkUtilities

class NetworkUtilities(connectivity: Connectivity, val networkClient: NetworkClient, val networkHelper: NetworkHelper, logger: Logger) : Connectivity

Utility class to group networking utilities onto a single object for a given com.tealium.prism.core.Tealium instance

Parameters

connectivity

The connectivity provider

networkClient

The shared NetworkClient for this instance

networkHelper

The shared NetworkHelper for this instance

Constructors

NetworkUtilities
Link copied to clipboard
constructor(connectivity: Connectivity, networkClient: NetworkClient, networkHelper: NetworkHelper, logger: Logger)

Properties

connectionStatus
Link copied to clipboard
open override val connectionStatus: ObservableState<Connectivity.Status>

Observable flow of connectivity statuses, enabling reactivity to network status changes

networkClient
Link copied to clipboard
val networkClient: NetworkClient
networkHelper
Link copied to clipboard
val networkHelper: NetworkHelper

Functions

connectionType
Link copied to clipboard
open override fun connectionType(): Connectivity.ConnectivityType

Utility to return the capability of the current active network.

isConnected
Link copied to clipboard
open override fun isConnected(): Boolean

Signifies whether the device has a network available for making outbound connections.

resourceCache
Link copied to clipboard
fun <T : DataItemConvertible> resourceCache(id: String, dataStore: DataStore, converter: DataItemConverter<T>): ResourceCache<T>

Creates a ResourceCache

resourceRefresher
Link copied to clipboard
fun <T : DataItemConvertible> resourceRefresher(dataStore: DataStore, converter: DataItemConverter<T>, parameters: ResourceRefresher.Parameters): ResourceRefresher<T>

Creates a ResourceRefresher that will regularly fetch updated values from a remote source as specified in the given parameters.

Generated by Dokka
(c) Tealium 2026