Target filter
Search Kotlin docs
  • Back
  • Tealium Prism Kotlin SDK Reference
core/com.tealium.prism.core.api.pubsub/Disposables/subscription

subscription

@JvmOverloads
fun subscription(onDispose: () -> Unit? = null): Disposable

Creates a Disposable which calls the given onDispose function when the subscription is disposed.

The returned implementation is not considered to be thread-safe, so interaction is expected to be constrained to an appropriate thread by the user.

Return

A Disposable to use to dispose of the subscription

Parameters

onDispose

Optional callback to execute when this Disposable is disposed.

Generated by Dokka
(c) Tealium 2026