Accessing the accelerometer in PhoneGap
In this tutorial we will take a look at how we can capture the devices motion in the x, y and z direction. The accelerometer is a motion sensor which detects movement changes relative to the current device orientation. At the end of this tutorial we will make an object move around the screen. This tutorial was made on a Mac using Aptana Studio 3 and was tested on a HTC Desire device running on Android 2.2.