Sync Client
interface SyncClient
This is a central entity used to work with Sync.
After creating a SyncClient you can open, create and modify SyncDocuments, SyncLists, SyncMaps and SyncStreams.
Example:
val syncClient = runCatching { SyncClient(context) { requestToken() } }.getOrElse { t ->
val errorInfo = (t as? TwilioException)?.errorInfo
Log.w(TAG, "Error creating SyncClient: $errorInfo")
return
}
Content copied to clipboard
Types
Properties
Link copied to clipboard
Current transport state.
Link copied to clipboard
Provides methods to work with SyncDocuments.
Link copied to clipboard
Provides scope of Flows objects to get notified about events.
Link copied to clipboard
Provides methods to work with SyncStreams.
Functions
Link copied to clipboard
Executes the given block function on SyncClient and then shuts it down correctly whether an exception is thrown or not.