how to find out in which direction was the phone tilted in android
<p>i am making an Android application in which i need to find out in which direction the user is shaking is phone. Not tilting, i mean literally jerking his hand in the direction of.</p>

<p>Actually i am making a photo viewing application and i wish to know if he has jerked his phone to the right then the next image should load up and if it is left movement , then the previous image should load up.</p>

<p>how do i achieve this. Currently to detect a shake i am using <a href="http://www.clingmarks.com/?p=25" rel="nofollow">this</a> tutorial.</p>

<p>thank you in advance.</p>
