I to restart a CountDownTimer. I read a lot of question here but no one of the answer helped me. When I use the following code
if(Const.counter != null){
Just call again the start() method:
start()
CountDownTimer cdt = new CountDownTimer(30000, 1000) { public void onTick(long millisUntilFinished) { mTextField.setText("seconds remaining: " + millisUntilFinished / 1000); } public void onFinish() { this.start(); //start again the CountDownTimer } };