ripe / com.ripe.android.base / Observable / bind

bind

fun bind(event: String, callback: (args: Map<String, Any>) -> Unit): ObservableCallback

Binds to an event by providing a block that will receive the event payload as a parameter. The block will be executed synchronously, for costly operations prefer the use of bindAsync.

Parameters

event - Name of the event to bind to.

callback - Block to be executed synchronously when the event is triggered.

Return
Returns the callback instance created, to be used when unbinding from the event.