Code example for CountDownTimer

Methods: start

0
            public void onFinish() { 
                mState = STATE_FINISHED;
                notifyClient( 0 ); 
            } 
        }; 
        mTimer.start();
        mState = STATE_RUNNING;
    } 
 
    public void stopCountDown() { 
        if ( mTimer != null ) {
            mTimer.cancel();
            mTimer = null;
        } 
        mState = STATE_PAUSED;
    } 
 
    public void resetCountDown() { 
        mState = STATE_RESET;
    }