Sync Callback
interface SyncCallback
A callback used to access the results from the Live Update sync process.
Example usage (kotlin):
LiveUpdateManager.sync(context, "appId", callback = object : SyncCallback {
override fun onAppComplete(syncResult: SyncResult) {
Log.d("LiveUpdate","CALLBACK: Sync success for app ${syncResult.liveUpdate.appId}!")
}
override fun onAppComplete(failResult: FailResult) {
Log.e("LiveUpdate","CALLBACK: Sync failed at step ${failResult.failStep.name} for app ${failResult.liveUpdate.appId}!")
}
override fun onSyncComplete() {
Log.d("LiveUpdate","CALLBACK: Sync finished!")
}
})
Content copied to clipboard
Example usage (Java):
LiveUpdateManager.sync(this, "appId", new SyncCallback() {
@Override
public void onAppComplete(@NonNull SyncResult syncResult) {
Log.d("LiveUpdate","CALLBACK: Sync success for app " + syncResult.getLiveUpdate().getAppId());
}
@Override
public void onAppComplete(@NonNull FailResult failResult) {
Log.d("LiveUpdate","CALLBACK: Sync failed at step " + failResult.getFailStep().name() + " for app " + failResult.getLiveUpdate().getAppId());
}
@Override
public void onSyncComplete() {
Log.d("LiveUpdate","CALLBACK: Sync finished!");
}
});
Content copied to clipboard