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.

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.

Parameters

observer

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