Android execute code after delay
In this sample code the myFuction() will call after 10 second
new Handler().postDelayed(new Runnable() { @Override public void run() { //your code here //you can add a block of code or a function cll myFunction(); } }, 10000); //setting 10 second delay : 1000 = 1 second
don't use Thread.sleep(10000);
because it will block your UI
Thanks,
This is what i am looking for