Hello pleas help me with wait() and notifyall() I need it, cause of the do while repeat!, the function savegame() call over ion a server and after the function get an answer from the server, the other function should repeat.
The part is in one function which shoul wait.
public static Boolean notifier = Boolean.valueOf(false);
synchronized (notifier) {
try {
System.out.println("Spiel noch nicht gespeichert, warten...");
notifier.wait();
} catch (Exception f) {
Log.e("Fehler", "Beim Warten");
}
}
and this is the part in the function where something happen, after that the function above should get notify.
synchronized (notifier) {
System.out.println("UNLOCK:" + System.currentTimeMillis());
notifier.notifyAll();
}