Retrieve ConnectionProfile objects for a MobileBroadbandAccount

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:

Note   A list of all ConnectionProfile 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();
    }
  }
else 
{
  // No connection profiles are associated with this mobile broadband account.
}

Common tasks for mobile broadband Windows Runtime APIs