Call Particular Method after regular interval of time
问题 In my android application I want to call particular method at regular interval of time ie. "after every 5 seconds"...how can i do that....? 回答1: You can use Timer for the fixed-period execution of a method. Here is a sample of code: final long period = 0; new Timer().schedule(new TimerTask() { @Override public void run() { // do your task here } }, 0, period); 回答2: This link above is tested and works fine. This is the code to call some method every second. You can change 1000 (= 1 second) to