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.
}
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for