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 fromconnectionTypes
ornull
(in that case the data from all connection types are merged)start
: the date of the first data usage chunk to retrieveend
: 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.