Sensor interface of the Sensor APIs is the base class for all the other sensor interfaces. This interface cannot be used directly. Instead it provides properties, event handlers, and methods accessed by interfaces that inherit from it.
This feature may be blocked by a Permissions Policy set on your server.
When initially created, the
Sensor object is idle, meaning it does not take measures. Once the
start() method is called, it prepares itself to read data and, once ready, the
activate event is sent and the sensor becomes activated. It then sends a
reading event each time new data is available.
In case of an error, the
error event is sent, reading stops, and the
Sensor object becomes idle again. The
start() method needs to be called again before it can read further data.
Interfaces based on
Below is a list of interfaces based on the
Returns a boolean value indicating whether the sensor is active.
Returns a boolean value indicating whether the sensor has a reading.
Returns the timestamp of the latest sensor reading.
Activates one of the sensors based on
Deactivates one of the sensors based on
|Generic Sensor API |
BCD tables only load in the browser