I have a countDownTimer and if the user does not hit the gameButton within the 12th second I want the gameOver method called. problem I either get game function called insta
Below is the code that I use which works same as the accepted answer but is quite simple to write and understand.
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Write whatever to want to do after delay specified (1 sec)
Log.d("Handler", "Running Handler");
}
}, 1000);