2. Accelerometer
An accelerometer is a device that measures the physical acceleration of an object. On mobile devices, the accelerometer, where implemented, allows the device or an application running on the device to determine its orientation in a three-dimensional space (using X, Y, and Z coordinates). The Cordova Accelerometer API allows a Cordova application to read the values measured by the accelerometer.
The Cordova API documentation states that the values returned by the accelerometer indicate the changes in a device’s motion through space, but that’s really not the case. If the accelerometer were actually measuring motion through space, the Accelerometer API would return no information when the device is stationary—and that is not the ...
Get Apache Cordova API Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.