|
I am not able to get bytes sent and received using NetworkInformation.GetInternetConnectionProfile(); since this function is returning Null.
Mobile Broadband dongle is being used to connect to internet. Connection calls using MB APIs are successful.
Code that fails is shown in the snippet below:
using Windows.Networking.Connectivity;
.
.
.
.
ConnectionProfile connectionprofile = NetworkInformation.GetInternetConnectionProfile();
if (connectionprofile != null)
{
DataUsage localusage = connectionprofile.GetLocalUsage(startime, currtime);
string message = "\n Connection details: bytes received:" + localusage.BytesReceived + " bytes sent:" + localusage.BytesSent + "\n";
}
-Sharath
|
|
|
|
|
Setting this solved the issue: internetClient capability in app manifest.
|
|
|
|