Ditto
Ditto
is the entry point for accessing Ditto-related functionality in the Android SDK.
Parameters
the dependencies required by the SDK to be initialised.
the identity to be used to represent the connected client.
Constructors
Creates a Ditto instance.
Properties
Provides access to authentication information and methods for logging on to Ditto Cloud.
An optional callback that will be called with lifecycle events relating to the SDK.
Configure a custom identifier for the current device.
A flag indicating whether or not sync is active. Use startSync()
to activate and stopSync()
to deactivate sync.
Path to the persistence directory in use.
Returns a string identifying version metadata of the Ditto SDK. Example: And4.4.3_73d36
The site identifier component of the identity in use.
Provides access to the SDK's small peer info functionality.
Provides access to store related functionality.
Assign a new transports configuration. By default peer-to-peer transports (Bluetooth and WiFi) are enabled.
Functions
Explicitly opt-in to disabling the ability to sync with Ditto peers running any version of the SDK in the v3 (or lower) series of releases.
Request bulk status information about the transports. This is mostly intended for statistical or debugging purposes.
Request information about Ditto peers connected to this device.
Request information about Ditto peers in the local peer-to-peer network. The V2 observer differs from observePeers
by providing not just information about the immediate peers, but also multihop information from other peers not immediately connected. V2 presence therefore offers a more complete view of the local peer-to-peer network.
Provide a hint to Ditto that app permissions may have changed.
Removes all sync metadata for any remote peers which aren't currently connected. This method shouldn't usually be called. Manually running garbage collection often will result in slower sync times. Ditto automatically runs a garbage a collection process in the background at optimal times.
Activate an offline Ditto
instance by setting a license token. You cannot sync with Ditto
before you have activated it. The offline license token is only valid for manual, offlinePlayground, and sharedKey identities.