ConnectivityManagerCompat

Helper for accessing features in ConnectivityManager.

Types

Properties

Link copied to clipboard
Device is not restricting metered network activity while application is running on background.
Link copied to clipboard
Device is restricting metered network activity while application is running on background.
Link copied to clipboard
Device is restricting metered network activity while application is running on background, but application is allowed to bypass it.

Functions

Link copied to clipboard
open fun getNetworkInfoFromBroadcast(@NonNull cm: @NonNull ConnectivityManager, @NonNull intent: @NonNull Intent): @Nullable NetworkInfo
Return the NetworkInfo that caused the given CONNECTIVITY_ACTION broadcast.
Link copied to clipboard
open fun getRestrictBackgroundStatus(@NonNull cm: @NonNull ConnectivityManager): Int
Determines if the calling application is subject to metered network restrictions while running on background.
Link copied to clipboard
Returns if the currently active data network is metered.