syncProviderAsync

Syncs the external live update provider source if present, reporting the outcome to callback instead of suspending. This is the Java-friendly counterpart to syncProvider.

The sync runs on a background coroutine scope owned by this Portal. callback is invoked on the main thread with the result, or with the error (including LiveUpdateNotConfigured) if the sync fails. This does not apply a timeout; see syncProvider.

Example usage (kotlin):

portal.syncProviderAsync(object : Portal.ProviderSyncCallback {
override fun onSuccess(result: ProviderSyncResult?) {
// handle result
}

override fun onFailure(error: Exception) {
// handle error
}
})

Example usage (java):

portal.syncProviderAsync(new Portal.ProviderSyncCallback() {
@Override
public void onSuccess(ProviderSyncResult result) {
// handle result
}

@Override
public void onFailure(Exception error) {
// handle error
}
});

Parameters

callback

invoked with the result of the synchronization operation, or with the error if the sync fails.