I'm looking for a way to analyze the data consumption from an UWP app. For this, I need to:
- get the data usage per newtork (wifi, cellular, roaming, ...)
- get the detailed information per installed app
In Windows 10, we can found these informations easily:
- for the data usage
- for the usage details per app
But how to get the same information in an app?
The only closest topic I foud is this one, but it's not really the same thing...
In UWP, We can get the network usage from a network connection using the ConnectionProfile Class which provides information about the connection status and connectivity statistics.
For your data usage, you can try the following code,
You can configure different
DataUsageGranularityandNetworkUsageStatesto get the data usage you want.But for your usage details, since UWP app run sandboxed, you can not get the detailed information, and there are no corresponding APIs in UWP.