See Also: ConnectivityManager
public class ConnectivityManager : Object
Class that answers queries about the state of network connectivity. It also notifies applications when network connectivity changes. Get an instance of this class by calling Context.GetSystemService(String).
The primary responsibilities of this class are to:
- Monitor network connections (Wi-Fi, GPRS, UMTS, etc.)
- Send broadcast intents when network connectivity changes
- Attempt to "fail over" to another network when connectivity to a network is lost
- Provide an API that allows applications to query the coarse-grained or fine-grained state of the available networks
- Provide an API that allows applications to request and select networks for their data traffic
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1
The members of Android.Net.ConnectivityManager are listed below.
See Also: Object
|ActionBackgroundDataSettingChanged||String. Broadcast Action: The setting for background data usage has changed values.|
|ConnectivityAction||String. A change in network connectivity has occurred.|
|DefaultNetworkPreference||Int32 (1). If you want to set the default network preference,you can directly change the networkAttributes array in framework's config.xml.|
|ExtraExtraInfo||String. The lookup key for a string that provides optionally supplied extra information about the network state.|
|ExtraIsFailover||String. 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.|
|ExtraNetworkInfo||String. The lookup key for a NetworkInfo object.|
|ExtraNetworkType||String. Network type which triggered a ConnectivityManager.ConnectivityAction broadcast.|
|ExtraNoConnectivity||String. The lookup key for a boolean that indicates whether there is a complete lack of connectivity, i.e., no network is available.|
|ExtraOtherNetworkInfo||String. The lookup key for a NetworkInfo object.|
|ExtraReason||String. The lookup key for a string that indicates why an attempt to connect to a network failed.|
|[read-only]||ActiveNetworkInfo||NetworkInfo. Returns details about the currently active default data network.|
|[read-only]||BackgroundDataSetting||Boolean. Returns the value of the setting for background data usage.|
|[read-only]||IsActiveNetworkMetered||Boolean. Returns if the currently active data network is metered.|
|[read-only]||IsDefaultNetworkActive||Boolean. Return whether the data network is currently active.|
|NetworkPreference||ConnectivityType. Retrieves the current preferred network type.|
|ProcessDefaultNetwork||Network. Returns the Network currently bound to this process via ConnectivityManager.BindProcessToNetwork(Network), or null if no Network is explicitly bound.|
Start listening to reports when the system's default data network is active, meaning it is a good time to perform network traffic.
Returns connection status information about all network types supported by the device.
Returns an array of all Network currently tracked by the framework.
Get the LinkProperties for the given Network.
Get the NetworkCapabilities for the given Network.
Returns connection status information about a particular network type.
Returns connection status information about a particular Network.
Tests if a given integer represents a valid network type.
Registers to receive notifications about all networks which satisfy the given NetworkRequest.
Remove network active listener previously registered with ConnectivityManager.AddDefaultNetworkActiveListener(.IOnNetworkActiveListener).
Report a problem network to the framework.
Request a network to satisfy a set of NetworkCapabilities.
Ensure that a network route exists to deliver traffic to the specified host via the specified network interface.
Binds the current process to network.
Tells the underlying networking system that the caller wants to begin using the named feature.
Tells the underlying networking system that the caller is finished using the named feature.
Unregisters callbacks about and possibly releases networks originating from ConnectivityManager.RequestNetwork(NetworkRequest, .NetworkCallback) and ConnectivityManager.RegisterNetworkCallback(NetworkRequest,PendingIntent) calls.