You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Network selection library for efficient, correct and validated network selection logic in 3P apps.
Uplift the network selection logic from the media reference app.
/**
* Implementation of app rules for network usage. A way to implement logic such as
* - Don't download large media items over BLE.
* - Only use LTE for downloads if user enabled.
* - Don't use metered LTE for logs and metrics.
*/
interface NetworkingRules {
/**
* Is this request considered high bandwidth and should activate LTE or Wifi.
*/
fun isHighBandwidthRequest(requestType: RequestType): Boolean
/**
* Checks whether this request is allowed on the current network type.
*/
fun checkValidRequest(
requestType: RequestType,
currentNetworkType: NetworkType
): RequestCheck
/**
* Returns the preferred network for a request.
*/
fun getPreferredNetwork(
networks: Networks,
requestType: RequestType
): NetworkStatus?
class NetworkRepository(
val connectivityManager: ConnectivityManager,
val coroutineScope: CoroutineScope,
val logger: NetworkStatusLogger,
) {
...
val networkStatus: MutableStateFlow<Networks>
The text was updated successfully, but these errors were encountered:
Network selection library for efficient, correct and validated network selection logic in 3P apps.
Uplift the network selection logic from the media reference app.
The text was updated successfully, but these errors were encountered: