The Geolocation API provides a common interface for locating the device, independently of the underlying technology (GPS, Wi-Fi networks identification, triangulation in cellular networks, etc.).
The DeviceOrientation Event Specification defines several DOM events that provide information about the physical orientation and motion of a hosting device. Most browsers support this specification, although various interoperability issues have arised. The work on the specification itself has been discontinued when the Geolocation Working Group was closed. It may fall in scope of the Device and Sensors Working Group when the group recharters, with a view to reducing inconsistencies across implementations and finalizing the specification accordingly, while the group develops the more powerful Orientation Sensor specification in parallel.
Technologies in progress
The Generic Sensor API defines a framework for exposing sensor data to the Web platform in a consistent way. In particular, the specification defines a blueprint for writing specifications of concrete sensors along with an abstract
Sensor interface that can be extended to accommodate different sensor types.
A number of sensor APIs are being built on top of the Generic Sensor API. The Proximity Sensor specification defines an API to monitor the presence of nearby objects without physical contact. The Ambient Light Sensor specification defines an API to monitor the ambient light level or illuminance of the device's environment. The Battery Status API exposes information about the battery status of the hosting service (however, note the future of this last specification is uncertain due to identified potential privacy-invasive usage of the API).
The detection of motion is made possible by a combination of low-level and high-level motion sensor specifications, also built on top of the Generic Sensor API:
- the Accelerometer to obtain information about acceleration applied to the device's local three primary axes;
- the Gyroscope to monitor the rate of rotation around the device's local three primary axes;
- the Magnetometer to measure magnetic field around the device's local three primary axes;
- the Orientation Sensor to monitor the device's physical orientation in relation to a stationary 3D Cartesian coordinate system.
|Generic Sensors||Generic Sensor API|
|Proximity sensors||Proximity Sensor|
|Ambient Light sensor||Ambient Light Sensor|
|Battery Status||Battery Status API|
The Geolocation Sensor is an API for obtaining geolocation reading from the hosting device. The feature set of the Geolocation Sensor is similar to that of the Geolocation API, but it is surfaced through the Generic Sensor API, improves security and privacy, and is extensible.
The proposed Ambient Humidity Events would allow mobile Web applications to receive events that correspond to changes in ambient humidity.
|Geolocation||Geolocation Sensor||Web Platform Incubator Community Group|
|Camera & Microphone streams||Media Capture and Streams||WebRTC Working Group|
|NFC||Web NFC API||Web NFC Community Group|
|Bluetooth||Web Bluetooth||Web Bluetooth Community Group|
|Humidity sensor||Ambient Humidity Events||Device and Sensors Working Group|
- Geofencing API
- The ability to detect when a device enters a given geographical area would enable interactions and notifications based on the user's physical presence in a given place. The Geolocation Working Group started to work on a geofencing API to that effect. This work has been discontinued, partly out of struggles to find a good approach to permission needs that such an API triggers to protect users against privacy issues, and because the API depended on the Service Workers, which was not yet stable at the time. Work on this specification could resume in the future depending on interest from would-be implementers.