Um timer é mais fácil de ser implementado:
private final Timer myTimer = new Timer();
public class myClass {
@Override
public void onResume() {
...
myTimer.scheduleAtFixedRate(new myTask(), 0, (long) (18000000)); // Tempo em milisegundos.
}
private class myTask extends TimerTask {
@Override
public void run() {
... execute os procedimentos.
}
}
}
http://stackoverflow.com/questions/15571169/i-need-help-understanding-the-scheduleatfixedrate-method-of-thetimer-class-in-jahttps://stackoverflow.com/questions/15571169/i-need-help-understanding-the-scheduleatfixedrate-method-of-thetimer-class-in-ja
http://www.iitk.ac.in/esc101/05Aug/tutorial/essential/threads/timer.html