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()
you can use java handlers to achieve your task:
Handler handler = new Handler(); handler.postDelayed(new Runnable() { public void run() { // Actions to do after 5 seconds } }, 5000);
for more information read the following url:
https://developer.android.com/reference/android/os/Handler.html