observeStatus

fun observeStatus(callback: (DittoAuthenticationStatus) -> Unit): Closeable

Registers a callback that is called whenever the authentication status changes.

Return

a Closable that you can use to stop this observation. Callbacks will stop after this goes out of scope or you explicitly call close() on it.

Parameters

callback

a closure that is invoked whenever the authentication status changes.


fun observeStatus(callback: DittoAuthenticationStatusDidChangeCallback): Closeable

Registers an observer object that is called whenever the authentication status changes.

Return

a Closable that you can use to stop this observation. Callbacks will stop after this goes out of scope or you explicitly call close() on it.

Parameters

callback

an object that implements the DittoAuthenticationStatusDidChangeCallback interface, whose authenticationStatusDidChange() method will be called whenever the authentication status changes.