android-components / mozilla.components.service.fxa.sync / SyncStatusObserver


interface SyncStatusObserver (source)

An interface for consumers that wish to observer “sync lifecycle” events.


Name Summary
onError abstract fun onError(error: Exception?): Unit
Gets called if sync encounters an error that’s worthy of processing by status observers.
onIdle abstract fun onIdle(): Unit
Gets called at the end of a sync, after every configured syncable has been synchronized. A set of enabled SyncEngines could have changed, so observers are expected to query SyncEnginesStorage.getStatus.
onStarted abstract fun onStarted(): Unit
Gets called at the start of a sync, before any configured syncable is synchronized.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.