NetworkStateObserverImpl

Constructors

Link copied to clipboard
constructor(connectivityManager: ConnectivityManager, kaliumDispatcher: KaliumDispatcher = KaliumDispatcherImpl)
constructor(appContext: Context, kaliumDispatcher: KaliumDispatcher = KaliumDispatcherImpl)
constructor()
constructor()

Functions

Link copied to clipboard
internal suspend fun NetworkStateObserver.delayBeforeSyncRetry(retryDelay: Duration, exponentialDurationHelper: ExponentialDurationHelper, logger: KaliumLogger, syncType: SyncType, timeSource: TimeSource = TimeSource.Monotonic, onRetryStateChanged: suspend (SyncRetryStatus) -> Unit = {}, retryController: SyncRetryController = SyncRetryController(), failureGeneration: Long? = null, previousNetworkId: String? = observeCurrentNetwork().value?.id)

Waits for retryDelay before the next sync retry attempt, completing earlier if internet connectivity comes back in the meantime, or if a validated network other than previousNetworkId becomes available.

Link copied to clipboard
open suspend fun delayUntilConnectedWithInternetAgain(delay: Duration, previousNetworkId: String?): Boolean
open suspend fun delayUntilConnectedWithInternetAgain(delay: Duration, previousNetworkId: String?): Boolean
open suspend fun delayUntilConnectedWithInternetAgain(delay: Duration, previousNetworkId: String?): Boolean
open suspend fun delayUntilConnectedWithInternetAgain(delay: Duration, previousNetworkId: String?): Boolean
Link copied to clipboard
actual open override fun observeCurrentNetwork(): StateFlow<CurrentNetwork?>
actual open override fun observeCurrentNetwork(): StateFlow<CurrentNetwork?>
expect open override fun observeCurrentNetwork(): StateFlow<CurrentNetwork?>
actual open override fun observeCurrentNetwork(): StateFlow<CurrentNetwork?>
Link copied to clipboard
actual open override fun observeNetworkState(): StateFlow<NetworkState>
actual open override fun observeNetworkState(): StateFlow<NetworkState>
expect open override fun observeNetworkState(): StateFlow<NetworkState>
actual open override fun observeNetworkState(): StateFlow<NetworkState>