NetworkMonitor

interface NetworkMonitor : Closeable

Monitors the network state. A NetworkMonitor is used to retry requests when network is available.

Functions

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract suspend fun isOnline(): Boolean

The current state of the network

Link copied to clipboard
abstract suspend fun waitForNetwork()

Waits until isOnline is true