Hour 12. Using the Gravity and Pressure Sensors
This hour continues our study of the Android sensors by examining the gravity sensor and pressure sensor, which are two of the more common sensors found in the majority of devices. These sensors might be used for some very interesting games if a creative designer were to put them to use.
Using the Gravity Sensor
The gravity sensor on Android devices reports an algorithmic value based on the linear acceleration sensor. In that regard, it is not a distinct hardware sensor but an algorithm (called a low-pass filter). However, we can still use it to get a decent report on gravity.
The gravity value returned by this ...