I'm making a game for android which has a countdown. The countdown works perfectly, but the problem is that when I pause the game (I stop painting the surfaceview), the countdown continues on.
new CountDownTimer(60000, 1000) {
public void onTick(long millisUntilFinished) {
timer = String.valueOf(millisUntilFinished / 1000);
invalidate();
}
public void onFinish() {
}
}.start();
How can I pause the countdown?