SyncClient

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.

todo: more detailed description with code examples please.

Types

Link copied to clipboard
Enum representing underlying twilsock connection state.
Link copied to clipboard
class LogLevel
Log level constants for passing to setLogLevel.
Link copied to clipboard
interface Properties
Specify properties for creating new Sync Client.
Link copied to clipboard
This interface defines SyncClient callback methods.

Functions

Link copied to clipboard
open fun create(context: Context, accessToken: String, props: SyncClient.Properties, listener: SuccessListener<SyncClient>)
Public factory method to create a new instance of Sync Client.
Link copied to clipboard
Link copied to clipboard
open fun getSdkVersion(): String
Link copied to clipboard
abstract fun openDocument(options: SyncOptions, observer: SyncDocumentObserver, output: SuccessListener<SyncDocument>)
Open or create a SyncDocument object.
Link copied to clipboard
abstract fun openList(options: SyncOptions, observer: SyncListObserver, output: SuccessListener<SyncList>)
Open or create a SyncList object.
Link copied to clipboard
abstract fun openMap(options: SyncOptions, observer: SyncMapObserver, output: SuccessListener<SyncMap>)
Open or create a SyncMap object.
Link copied to clipboard
abstract fun openStream(options: SyncOptions, observer: SyncStreamObserver, output: SuccessListener<SyncStream>)
Open or create a SyncStream object.
Link copied to clipboard
Set new listener on the client.
Link copied to clipboard
open fun setLogLevel(level: Int)
Set verbosity level for log messages to be printed to android logcat.
Link copied to clipboard
abstract fun shutdown()
Cleanly shut down the SyncClient and free up associated resources.
Link copied to clipboard
abstract fun updateToken(accessToken: String, listener: SuccessListener<Void>)
Update SyncClient with a refreshed token.