sync Provider Async
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 and is bounded by a PROVIDER_SYNC_TIMEOUT_MS timeout; callback is invoked with the result, or with the error (including LiveUpdateNotConfigured or a timeout) if the sync fails.
Example usage (kotlin):
portal.syncProviderAsync(object : Portal.ProviderSyncCallback {
override fun onSuccess(result: ProviderSyncResult?) {
// handle result
}
override fun onFailure(error: Exception) {
// handle error
}
})Content copied to clipboard
Example usage (java):
portal.syncProviderAsync(new Portal.ProviderSyncCallback() {
@Override
public void onSuccess(ProviderSyncResult result) {
// handle result
}
@Override
public void onFailure(Exception error) {
// handle error
}
});Content copied to clipboard
Parameters
callback
invoked with the result of the synchronization operation, or with the error if the sync fails.