Windows hardware
Collapse the table of content
Expand the table of content

Retrieve ConnectionProfile objects for a MobileBroadbandAccount

Updated: August 27, 2013

A ConnectionProfile object contains a set of properties and methods that you can use to obtain connectivity, usage, and data plan information for established network connections. The connection profiles associated with a mobile account can be retrieved by using the MobileBroadbandAccount object. The following code example illustrates shows how to do this:

A list of allConnectionProfile objects can be retrieved from Windows.Networking.Connectivity.NetworkInformation.GetConnectionProfiles.

var myConnectionProfileList = myNetworkAccountObject.getConnectionProfiles();

if (myConnectionProfileList.length !== 0)
  for (var i = 0; i < myConnectionProfileList.length; i++)
    //Display connection profile properties
    var connectivityLevel = myConnectionProfileList[i].getNetworkConnectivityLevel();
  // No connection profiles are associated with this mobile broadband account.

See Also

© 2016 Microsoft