title: How to detect movement of an android device?
body: <p>I need suggestion about how to detect the amount of movement of an android device. Suppose I have put the phone on a table or bed and then if somebody taps the table or sits or laydown on the bed then I want to detect the movement of the android device.</p>
  
  <p>Actually I know that android has motion sensors APIs but I don't know which sensor to use and what sensor type is best for this type of movement detection.</p>
  
  <p>I would be glad if someone can share some basic demo code.</p>