Use SensorListener to implement detect shaking function