Android Question Detect phone right and left movement

edwin

New Member
Licensed User
Longtime User
I want to detect when phone is moved to right or left , up or down , I used accelerometer sensor in sensors example and changed the "Sensor_SensorChanged" event to get difference of current x,y,z values from last values. but I don't get any idea how to detect the movements.
please let me know if there is any algorithm or formula to detect for example right movement
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…