Android Development Delayed task execution in Java and Android If you need to do some delayed task in for example your Android App, you can easily achieve this with a Java TimerTask. This is a short example, where some method ( removeDialog() ) is run with a delay of 2 seconds. //import statements import java.