ConnectionProfile.GetAttributedNetworkUsageAsync(DateTime, DateTime, NetworkUsageStates) ConnectionProfile.GetAttributedNetworkUsageAsync(DateTime, DateTime, NetworkUsageStates) ConnectionProfile.GetAttributedNetworkUsageAsync(DateTime, DateTime, NetworkUsageStates) ConnectionProfile.GetAttributedNetworkUsageAsync(DateTime, DateTime, NetworkUsageStates) ConnectionProfile.GetAttributedNetworkUsageAsync(DateTime, DateTime, NetworkUsageStates) Method

Definition

Gets network usage data for each individual application. This method is only supported in a Windows Phone 8.x app.

public : IAsyncOperation<IVectorView<AttributedNetworkUsage>> GetAttributedNetworkUsageAsync(DateTime startTime, DateTime endTime, NetworkUsageStates states)
IAsyncOperation<IVectorView<AttributedNetworkUsage>> GetAttributedNetworkUsageAsync(DateTime startTime, DateTime endTime, NetworkUsageStates states) const;
public IAsyncOperation<IReadOnlyList<AttributedNetworkUsage>> GetAttributedNetworkUsageAsync(DateTimeOffset startTime, DateTimeOffset endTime, NetworkUsageStates states)
Public Function GetAttributedNetworkUsageAsync(startTime As DateTimeOffset, endTime As DateTimeOffset, states As NetworkUsageStates) As IAsyncOperation<IReadOnlyList<AttributedNetworkUsage>>(Of IVectorView)
Windows.Networking.Connectivity.ConnectionProfile.getAttributedNetworkUsageAsync(startTime, endTime, states).done( /* Your success and error handlers */ );

Parameters

startTime
DateTimeOffset DateTimeOffset DateTimeOffset

The start time of the usage window.

endTime
DateTimeOffset DateTimeOffset DateTimeOffset

The end time of the usage window.

states
NetworkUsageStates NetworkUsageStates NetworkUsageStates

The state of the connection profile for which usage data should be returned.

Returns

IAsyncOperation<IReadOnlyList<AttributedNetworkUsage>> IAsyncOperation<IReadOnlyList<AttributedNetworkUsage>> IAsyncOperation<IReadOnlyList<AttributedNetworkUsage>>

When the method completes, it returns a list of AttributedNetworkUsage objects, which indicate the sent and received values, in bytes, and the total amount of time the app was connected during the corresponding time interval.

Additional features and requirements

Capabilities
networkDataPlanProvisioning

Remarks

Note

Data usage tracking is not supported when an app is run on the emulator under Microsoft Visual Studio 2013 Update 2 instead of an actual device. As a result, the GetAttributedNetworkUsageAsync method in a Windows Phone 8.x app will fail when run on the emulator.