15 Web APIs you've never heard of

11. Generic Sensor API

There are already a lot of Web APIs that define interfaces for different kinds of sensors (for example, the Device Orientation API and the Geolocation API). Unfortunately those APIs do not have a common interface and are all used differently – for example, by providing callback handlers in one case, or by registering event handlers in another. The goal of the Generic Sensor API is to define a set of common, generic interfaces for accessing any kind of sensor. Concrete sensor APIs that are based on the Generic Sensor API (such as the Ambient Light API) extend generic interfaces and add functionality as required.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

Philip is a software engineer working at the Fraunhofer Institute. He has written three books and many articles on Java and JavaScript, and is the creator of Philip’s JS Recipes.