Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / DatasyncManager / subscribeToStateChange

subscribeToStateChange

fun subscribeToStateChange(callback: (DatasyncState) -> Unit): Subscription

Subscribes to the DatasyncState of the DatasyncService associated with this DatasyncManager instance, and calls asynchronously the given callback each time this state changes.

The returned Subscription can be cancelled further when needed.