Detect Shake Gesture on a Device