Well-deployed technologies
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.
Feature | Specification | Maturity | Current implementations |
---|---|---|---|
Geolocation | Geolocation API Specification | Shipped | |
Motion sensors | DeviceOrientation Event Specification | Under consideration Shipped |
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.
Feature | Specification | Maturity | Current implementations |
---|---|---|---|
Generic Sensors | Generic Sensor API | N/A | |
Proximity sensors | Proximity Sensor | Shipped | |
Ambient Light sensor | Ambient Light Sensor | Experimental Shipped | |
Battery Status | Battery Status API | Shipped | |
Motion sensors | Accelerometer | ||
Gyroscope | |||
Magnetometer | In development | ||
Orientation Sensor |
Exploratory work
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.
As detailed in the Media part of this document, there is ongoing work on APIs to open up access to camera and microphone streams.
Work on a Web Near-Field Communications (NFC) API to enable wireless communication between two devices at close proximity has started in the Web NFC Community Group.
Similarly, the Web Bluetooth specification, developed by the Web Bluetooth Community Group, describes an API to discover and communicate with devices over the Bluetooth Low Energy (BLE) mode.
The proposed Ambient Humidity Events would allow mobile Web applications to receive events that correspond to changes in ambient humidity.
Feature | Specification | Group | Implementation intents |
---|---|---|---|
Geolocation | Geolocation Sensor | Web Platform Incubator Community Group | N/A |
Camera & Microphone streams | Media Capture and Streams | WebRTC Working Group | Shipped |
NFC | Web NFC API | Web NFC Community Group | Under consideration In development |
Bluetooth | Web Bluetooth | Web Bluetooth Community Group | Under consideration Shipped |
Humidity sensor | Ambient Humidity Events | Device and Sensors Working Group | N/A |
Discontinued features
- 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.