Skip to main content

SyncCallback

The Sync Callback interface is used to provide completion behavior when using the asynchronous LiveUpdateManager.sync() method.

Usage

// Sync all apps not in parallel and with a callback
LiveUpdateManager.sync(context, async = false, callback = object : SyncCallback {
override fun onAppComplete(liveUpdate: LiveUpdate, failStep: FailStep?) {
if(failStep != null) {
Log.e("LiveUpdate","CALLBACK: Sync failed at step ${failStep.name} for app ${liveUpdate.appId}!")
} else {
Log.d("LiveUpdate","CALLBACK: Sync success for app ${liveUpdate.appId}!")
}
}

override fun onSyncComplete() {
Log.d("LiveUpdate","CALLBACK: Sync finished!")
}
})

Methods

onAppComplete

static

Called when the LiveUpdateManager.sync() method has finished syncing each app in the sync process.

Parameters

NameTypeDescription
liveUpdateLiveUpdateInformation about the app synced.
failStepFailStepContains information about the step the sync failed on if an error occurred when syncing an app.

onSyncComplete

static

Called once when the LiveUpdateManager.sync() method has finished syncing all apps.