title: CountDownTimer.cancel() is not working in Android
body: <p><code>CountDownTimer.cancel()</code> is not working in the below code:</p>
  
  <pre><code>myTimer = new CountDownTimer(10000, 1000) {
      public void onFinish() {
      }
      @Override
      public void onTick(long millisUntilFinished) {
          if(null != myObject){
              myTimer.cancel();
          }
      }
  }.start();
  </code></pre>
  
  <p>In the above code I have started a <code>CountDownTimer</code> which check if the object is not <code>null</code> and cancels the Timer accordingly. The object is set by some listener at any point of time.
  Please refer and suggest. Am I doing the right thing here?</p>
  
  <blockquote>
    <p><strong>Solution By Gautier Hayoun</strong> :</p>
    
    <p>Just made a drop-in replacement for
    CountDownTimer that you can cancel
    from within onTick : <a href="https://gist.github.com/737759">Github link</a>–
    Gautier Hayoun Dec 12 '10 at 1:04</p>
  </blockquote>