AndroidDev, Android App Development, Android, Jetpack, Jetpack Compose.
ensures that lambda remains active to be able to send data later-on during callbacks. It also provides awaitClose block to unregister listeners when callbackFlow closes. In lambda connectivityManager is registering to the network status callbacks. In each callback method it sends a NetworkStatus