I have 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){
Const.counter.cancel();
Const.counter = null;
}
Const.counter = new CustomTimerTask(Const.currentLevel.timeGoal * 1000,1000);
Const.counter.start();
I started a new counter but the old one also continues work. Please help me solve it.