Android.Net.ConnectivityManager Members

The members of Android.Net.ConnectivityManager are listed below.

See Also: Inherited members from Java.Lang.Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ActionBackgroundDataSettingChangedstring. Broadcast Action: The setting for background data usage has changed values.
const
ConnectivityActionstring. A change in network connectivity has occurred.
const
DefaultNetworkPreferenceint (1). If you want to set the default network preference,you can directly change the networkAttributes array in framework's config.xml.
const
ExtraExtraInfostring. The lookup key for a string that provides optionally supplied extra information about the network state.
const
ExtraIsFailoverstring. The lookup key for a boolean that indicates whether a connect event is for a network to which the connectivity manager was failing over following a disconnect on another network.
const
ExtraNetworkInfostring. The lookup key for a Android.Net.NetworkInfo object.
const
ExtraNetworkTypestring. Network type which triggered a ConnectivityManager.ConnectivityAction broadcast.
const
ExtraNoConnectivitystring. The lookup key for a boolean that indicates whether there is a complete lack of connectivity, i.e., no network is available.
const
ExtraOtherNetworkInfostring. The lookup key for a Android.Net.NetworkInfo object.
const
ExtraReasonstring. The lookup key for a string that indicates why an attempt to connect to a network failed.

Public Properties

[read-only]
ActiveNetworkInfoNetworkInfo. Returns details about the currently active default data network.
[read-only]
BackgroundDataSettingbool. Returns the value of the setting for background data usage.
[read-only]
IsActiveNetworkMeteredbool. Returns if the currently active data network is metered.
[read-only]
IsDefaultNetworkActivebool. Return whether the data network is currently active.
NetworkPreferenceConnectivityType. Retrieves the current preferred network type.
[read-only]
static
ProcessDefaultNetworkNetwork. Returns the Android.Net.Network currently bound to this process via ConnectivityManager.SetProcessDefaultNetwork(Network), or null if no Android.Net.Network is explicitly bound.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AddDefaultNetworkActiveListener(ConnectivityManager.IOnNetworkActiveListener)
Start listening to reports when the system's default data network is active, meaning it is a good time to perform network traffic.
static
FromContext(Android.Content.Context) : ConnectivityManager
Documentation for this section has not yet been entered.
GetAllNetworkInfo() : NetworkInfo[]
Returns connection status information about all network types supported by the device.
GetAllNetworks() : Network[]
Returns an array of all Android.Net.Network currently tracked by the framework.
GetLinkProperties(Network) : LinkProperties
Get the Android.Net.LinkProperties for the given Android.Net.Network.
GetNetworkCapabilities(Network) : NetworkCapabilities
Get the Android.Net.NetworkCapabilities for the given Android.Net.Network.
GetNetworkInfo(ConnectivityType) : NetworkInfo
Returns connection status information about a particular network type.
GetNetworkInfo(Network) : NetworkInfo
Returns connection status information about a particular Network.
static
IsNetworkTypeValid(ConnectivityType) : bool
Tests if a given integer represents a valid network type.
RegisterNetworkCallback(NetworkRequest, ConnectivityManager.NetworkCallback)
Registers to receive notifications about all networks which satisfy the given Android.Net.NetworkRequest.
RemoveDefaultNetworkActiveListener(ConnectivityManager.IOnNetworkActiveListener)
Remove network active listener previously registered with ConnectivityManager.AddDefaultNetworkActiveListener(.IOnNetworkActiveListener).
ReportBadNetwork(Network)
Report a problem network to the framework.
RequestNetwork(NetworkRequest, ConnectivityManager.NetworkCallback)
Request a network to satisfy a set of Android.Net.NetworkCapabilities.
RequestRouteToHost(ConnectivityType, int) : bool
Ensure that a network route exists to deliver traffic to the specified host via the specified network interface.
RequestRouteToHostAsync(ConnectivityType, int) : System.Threading.Tasks.Task<bool>
Documentation for this section has not yet been entered.
static
SetProcessDefaultNetwork(Network) : bool
Binds the current process to network.
StartUsingNetworkFeature(ConnectivityType, string) : int
Tells the underlying networking system that the caller wants to begin using the named feature.
StopUsingNetworkFeature(ConnectivityType, string) : int
Tells the underlying networking system that the caller is finished using the named feature.
UnregisterNetworkCallback(ConnectivityManager.NetworkCallback)
Unregisters callbacks about and possibly releases networks originating from ConnectivityManager.RequestNetwork(NetworkRequest, .NetworkCallback) and ConnectivityManager.RegisterNetworkCallback(NetworkRequest, .NetworkCallback) calls.

Public Events

DefaultNetworkActiveDocumentation for this section has not yet been entered.