• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. MozNetworkStatsManager
  6. MozNetworkStatsManager.getNetworkStats()

MozNetworkStatsManager.getNetworkStats()

In This Article
  1. Summary
  2. Syntax
    1. parameters
  3. Return
  4. Specifications
  5. See also

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

  • MozNetworkStatsManager
  • MozNetworkStats
  • Network Stats API

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • Firefox OS
  • Method
  • Network Stats
  • Non Standard
  • Obsolete
  • Reference
  • Référence
 Contributors to this page: chrisdavidmills, zeller, fscholz, MHasan, kscarfone, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:08:42 AM
See also
  1. Network Stats API
  2. Archive
  3. Related pages for Network Stats API
    1. MozNetworkStats
    2. MozNetworkStatsData
    3. MozNetworkStatsManager