Adsense Ad

Wednesday 13 September 2017

How to use timer in android

TimerTask doAsynchronousTask = new TimerTask() {
    @Override
    public void run() {

        //Perform background work here

        handler.post(new Runnable() {
            public void run() {
                //Perform GUI updation work here
                //Toast work also
            }
        });
    }
};
timer.schedule(doAsynchronousTask, 10, 5000);

No comments: