Brug følgende kode til at ringe til din funktion hver 15/30/45
final Handler handler = new Handler();
Timer timer = new Timer();
TimerTask doAsynchronousTask = new TimerTask() {
@Override
public void run() {
handler.post(new Runnable() {
@SuppressWarnings("unchecked")
public void run() {
try {
"Your function call "
}
catch (Exception e) {
// TODO Auto-generated catch block
}
}
});
}
};
timer.schedule(doAsynchronousTask, 0, "Timer value");