timer = new Timer("Timer Thread");
timer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
showDialog(0);
timeBar.setProgress(time);
}
}
}, INTERVAL, INTERVAL);`
My onCreateDialog method is working fine, so when I use showDialog(0) from a Button it works fine. But not if the method is called by a Scheduler.