addChangeListener

Add a change listener to listen to change events occurring to any documents in the collection. To remove the listener, call remove() function on the returned listener token.

Return

token used to cancel the listener

Parameters

listener

the observer

See also


Add a change listener to listen to change events occurring to any documents in the collection. To remove the listener, call remove() function on the returned listener token.

The CoroutineContext will be used to launch coroutines the listener will be called on. Coroutines will be launched in a CoroutineScope that is canceled when the listener is removed.

Return

token used to cancel the listener

Parameters

context

coroutine context in which the listener will run

listener

the observer

See also


Add a change listener to listen to change events occurring to any documents in the collection.

The CoroutineScope will be used to launch coroutines the listener will be called on. The listener is removed when the scope is canceled.

Parameters

scope

coroutine scope in which the listener will run

listener

the observer