title: In Android how can I disable a Listener for a while after an event has been caught?
body: <p>For example:</p>
  
  <pre><code>private final SensorEventListener mySensorEventListener = new SensorEventListener() {
     @Override
     public void onSensorChanged(SensorEvent se) {
        // pseudo code
        if (it is a shake event) {
           output some text;
        }
     }
  }
  </code></pre>
  
  <p>I have implemented a <code>SensorEventListener</code>, but the shake events are detected directly one after another. What can I do to make the listener rest for a while after a shake event is detected and some text is output?</p>