Where on the desktop has the device been pushed to?

Source code in Where.zip

Keep the device lying face up in portrait orientation on a tabletop. Being careful not to rotate the device towards landscape, push it left and right, up and down along the tabletop. It will keep track of how far in meters it has been moved from its initial position.

x, y is the position, vx, vy is the velocity, and ax, ay is the acceleration.

  1. MainActivity.java.
  2. activity_main.xml
  3. strings.xml
  4. dimens.xml
  5. AndroidManifest.xml
  6. build.gradle (Module: app).