Freigeben über


ConnectivityManager.IsActiveNetworkMetered Property

Definition

Returns if the currently active data network is metered.

public virtual bool IsActiveNetworkMetered { [Android.Runtime.Register("isActiveNetworkMetered", "()Z", "GetIsActiveNetworkMeteredHandler")] [Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")] get; }
[<get: Android.Runtime.Register("isActiveNetworkMetered", "()Z", "GetIsActiveNetworkMeteredHandler")>]
[<get: Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")>]
member this.IsActiveNetworkMetered : bool

Property Value

true if large transfers should be avoided, otherwise false.

Attributes

Remarks

Returns if the currently active data network is metered. A network is classified as metered when the user is sensitive to heavy data usage on that connection due to monetary costs, data limitations or battery/performance issues. You should check this before doing large data transfers, and warn the user or delay the operation until another network is available.

Java documentation for android.net.ConnectivityManager.isActiveNetworkMetered().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to