addDocumentChangeListener
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, listener)
Adds a change listener for the changes that occur to the specified document, in the default collection.
The changes will be delivered on the main thread for platforms that support it: Android, iOS, and macOS. Callbacks are on an arbitrary thread for the JVM, Linux, and Windows platform.
Return
An opaque listener token object for removing the listener.
Parameters
document ID
The listener to post changes.
See also
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, context, listener)
Adds a change listener for the changes that occur to the specified document, in the default collection, with a CoroutineContext that 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
An opaque listener token object for removing the listener.
Parameters
document ID
coroutine context in which the listener will run
The listener to post changes.
See also
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, scope, listener)
Adds a change listener for the changes that occur to the specified document, in the default collection, with a CoroutineScope that will be used to launch coroutines the listener will be called on. The listener is removed when the scope is canceled.
Parameters
document ID
coroutine scope in which the listener will run
callback
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, listener)
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, context, listener)
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, scope, listener)
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, listener)
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, context, listener)
Deprecated
Use defaultCollection.addDocumentChangeListener()
Replace with
defaultCollection.addDocumentChangeListener(id, scope, listener)