Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / Subscriber / subscribe

subscribe

fun subscribe(type: Child, constraint: Constraint = Constraint.None, callback: (ChildEvent) -> Unit): Subscription

Subscribes to a Child event with a given constraint on this data node and send notifications to a callback function.

fun subscribe(type: ValueChanged.WithData, constraint: Constraint = Constraint.None, callback: (ValueChangedWithDataEvent) -> Unit): Subscription

Subscribes to a ValueChanged.WithData event with a given constraint on this data node and send notifications to a callback function.

fun subscribe(type: ValueChanged.WithoutData, constraint: Constraint = Constraint.None, callback: (ValueChangedWithoutDataEvent) -> Unit): Subscription

Subscribes to a ValueChanged.WithoutData event with a given constraint on this data node and send notifications to a callback function.