final Runnable r = new Runnable() { public void run() { gameOver(); } }; handler.postDelayed(r,1000);