I\'m writing an activity in Android where the user modifies an SQL Database. The UI consists of an EditText where the user enters the name, and a Seekbar where the user ente
before invoke wait need get the object lock like this:
synchronized(Thread.currentThread()) { //added
try {
Thread.currentThread().wait();
} catch (InterruptedException e) {
Log.e("Attractivometer","Main Thread interrupted while waiting");
e.printStackTrace();
}
}
but why you want to make main thread wait?