Example of how to use Android sensors
The Android sensors are hardware devices. Android provides a manager to control the devices. User should register the devices you want to use by the manager. And implements the callback functions for the sensor event alert.
This article teaches how to use Android sensors. http://ibuzzlog.blogspot.tw/2012/08/how-to-use-android-sensors.html