Accelerometer Example App

Accelerometer Values is a simple application that displays the accelerometer values: lateral, longitudinal, and vertical. The 3 TextViews that display the values are constantly updated to reflect the physical device's current movement. To obtain the accelerometer values, a SensorEventListener is registered to listen on changes in the accelerometer's values.

Let's run through the project and familiarize ourselves with the code. Click here to download the source files.

Run this application on a physical device with an acclerometer to see its behavior when you move the phone.

The finished app will display something like the image below.