Code example for Vibrator

Methods: cancel

0
    if (mPlaying) {
      mPlaying = false;
      if (mMediaPlayer != null) 
        mMediaPlayer.stop();
 
      mVibrator.cancel();
    } 
    disableKiller(); 
  } 
 
  void setKillerCallback(KillerCallback killerCallback) {
      mKillerCallback = killerCallback;
  } 
  private void enableKiller(int duration) {
    mTimeout = new Handler();
    mTimeout.postDelayed(new Runnable() {
      public void run() { 
          if (mKillerCallback != null) mKillerCallback.onKilled();
      } 
    }, duration);
  }