I want to wait 5 seconds before starting another public void method. The thread sleep was not working for me. If there is a way of wait() without using Threads I wo
wait()
I use the following code (the same as you see before) for my android app, i need to wait some threads before start my new method. It works fine.
Handler handler = new Handler(); handler.postDelayed(new Runnable() { public void run() { // yourMethod(); } }, 5000); //5 seconds