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

JavaScript
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

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/moznetworkstatsmanager/getnetworkstats

API B2G Firefox OS Method Network Stats Obsolete Reference Référence