How can I check if a Windows 8 device is currently sending/receiving data on an wifi/mobile data connection?

StackOverflow https://stackoverflow.com/questions/13256737

Domanda

I want to see if there is mobile data activity. How can I do this using the WinRT api (c#)? I can check if the device has active mobile data, ethernet or wifi connections, but can't seem to check if any of those connections are currently sending/receiving data.

È stato utile?

Soluzione

You could use http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.connectivity.datausage.aspx and check the bytesReceived property. If it changed, data was just transfered. See the linked Quickstart for more information on how to use this.

Other than that, I don't think there's a specialized API for that.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top