Share via


ConnectivityManager.BackgroundDataSetting Property

Definition

Caution

deprecated

Returns the value of the setting for background data usage.

[System.Obsolete("deprecated")]
public virtual bool BackgroundDataSetting { [Android.Runtime.Register("getBackgroundDataSetting", "()Z", "GetGetBackgroundDataSettingHandler")] get; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getBackgroundDataSetting", "()Z", "GetGetBackgroundDataSettingHandler")>]
member this.BackgroundDataSetting : bool

Property Value

Whether background data usage is allowed.

Attributes

Remarks

Returns the value of the setting for background data usage. If false, applications should not use the network if the application is not in the foreground. Developers should respect this setting, and check the value of this before performing any background data operations.

All applications that have background services that use the network should listen to #ACTION_BACKGROUND_DATA_SETTING_CHANGED.

This member is deprecated. As of VERSION_CODES#ICE_CREAM_SANDWICH, availability of background data depends on several combined factors, and this method will always return true. Instead, when background data is unavailable, #getActiveNetworkInfo() will now appear disconnected.

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

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