Example of using Android accelerometer to detect a shake