Package io.objectbox.sync

ObjectBox Sync allows to automatically synchronize local data with a sync destination (e.g. a sync server) and vice versa. This is the sync client package.

These are the typical steps to setup a sync client:

  1. Create a BoxStore as usual (using MyObjectBox)
  2. Get a SyncBuilder using Sync.client( io.objectbox.BoxStore, java.lang.String, io.objectbox.sync.SyncCredentials). Here you need to pass the BoxStore, along with an URL to the sync destination (server), and credentials. For demo set ups, you could start with SyncCredentials.none() credentials.
  3. Optional: use the SyncBuilder instance from the last step to configure the sync client and set initial listeners.
  4. Call SyncBuilder.build()
  5. to get an instance of SyncClient (and hold on to it). Synchronization is now active.
  6. Optional: Interact with SyncClient