ConnectivityManager.GetAllNetworks Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an array of all Network
currently tracked by the framework.
[Android.Runtime.Register("getAllNetworks", "()[Landroid/net/Network;", "GetGetAllNetworksHandler")]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")]
public virtual Android.Net.Network[] GetAllNetworks ();
[<Android.Runtime.Register("getAllNetworks", "()[Landroid/net/Network;", "GetGetAllNetworksHandler")>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")>]
abstract member GetAllNetworks : unit -> Android.Net.Network[]
override this.GetAllNetworks : unit -> Android.Net.Network[]
Returns
an array of Network
objects.
- Attributes
Remarks
Returns an array of all Network
currently tracked by the framework.
This member is deprecated. This method does not provide any notification of network state changes, forcing apps to call it repeatedly. This is inefficient and prone to race conditions. Apps should use methods such as #registerNetworkCallback(NetworkRequest, NetworkCallback)
instead. Apps that desire to obtain information about networks that do not apply to them can use NetworkRequest.Builder#setIncludeOtherUidNetworks
.
Java documentation for android.net.ConnectivityManager.getAllNetworks()
.
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.