MozNetworkStatsManager.getNetworkStats()

This API is available on Firefox OS for internal applications only.

Retrieval of data usage statistics is now done via the MozNetworkStatsManager.getSamples method.

Summary

The getNetworkStats method allows to retrieve the data usage statistics for the various connection types.

Syntax

var request = navigator.mozNetworkStats.getNetworkStats(options);

parameters

options
A regular JavaScript object with the following properties:
  • connectionType: one of the strings available from connectionTypes or null (in that case the data from all connection types are merged)
  • start: the date of the first data usage chunk to retrieve
  • end: the date of the last data usage chunk to retrieve

Return

A DOMrequest object to handle the success or error of the operation. In case of success, the request's result is a MozNetworkStats object providing the requested information.

Specifications

Not part of any specification.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, zeller, fscholz, MHasan, kscarfone, Jeremie
 Last updated by: chrisdavidmills,