ConnectionProfile.GetNetworkConnectivityLevel | getNetworkConnectivityLevel method

Applies to Windows and Windows Phone

Gets the network connectivity level for this connection. This value indicates what network resources, if any, are currently available.

Syntax


var networkConnectivityLevel = connectionProfile.getNetworkConnectivityLevel();

Parameters

This method has no parameters.

Return value

Type: NetworkConnectivityLevel

The level of network connectivity.

Remarks

The GetNetworkConnectivityLevel method may take time in some cases to determine the current value of the network connectivity level. The recommended process for determining the network connectivity level is to register a handler for the NetworkStatusChanged event on the NetworkInformation class. When a notification is received of a network status change, obtain the new connectivity level by calling the GetNetworkConnectivityLevel method on the profile returned by the GetInternetConnectionProfile method. The returned network connectivity level can then be stored for later use when needed. This also ensures that the correct ConnectionProfile is checked.

Requirements

Minimum supported client

Windows 8

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadata

Windows.winmd

See also

ConnectionProfile
GetInternetConnectionProfile
NetworkInformation
NetworkStatusChanged

 

 

Show:
© 2014 Microsoft. All rights reserved.