ConnectivityManager.GetNetworkInfo 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.
Overloads
GetNetworkInfo(ConnectivityType) |
Returns connection status information about a particular network type. |
GetNetworkInfo(Network) |
Returns connection status information about a particular Network. |
GetNetworkInfo(ConnectivityType)
Returns connection status information about a particular network type.
[Android.Runtime.Register("getNetworkInfo", "(I)Landroid/net/NetworkInfo;", "GetGetNetworkInfo_IHandler")]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")]
public virtual Android.Net.NetworkInfo? GetNetworkInfo (Android.Net.ConnectivityType networkType);
[<Android.Runtime.Register("getNetworkInfo", "(I)Landroid/net/NetworkInfo;", "GetGetNetworkInfo_IHandler")>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")>]
abstract member GetNetworkInfo : Android.Net.ConnectivityType -> Android.Net.NetworkInfo
override this.GetNetworkInfo : Android.Net.ConnectivityType -> Android.Net.NetworkInfo
Parameters
- networkType
- ConnectivityType
integer specifying which networkType in which you're interested.
Returns
- Attributes
Remarks
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
GetNetworkInfo(Network)
Returns connection status information about a particular Network.
[Android.Runtime.Register("getNetworkInfo", "(Landroid/net/Network;)Landroid/net/NetworkInfo;", "GetGetNetworkInfo_Landroid_net_Network_Handler")]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")]
public virtual Android.Net.NetworkInfo? GetNetworkInfo (Android.Net.Network? network);
[<Android.Runtime.Register("getNetworkInfo", "(Landroid/net/Network;)Landroid/net/NetworkInfo;", "GetGetNetworkInfo_Landroid_net_Network_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")>]
abstract member GetNetworkInfo : Android.Net.Network -> Android.Net.NetworkInfo
override this.GetNetworkInfo : Android.Net.Network -> Android.Net.NetworkInfo
Parameters
Returns
- Attributes
Remarks
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.