I want that a new activity should start with some delay on pressing a button. Is it possible to do that , and whats the procedure.
runOnUiThread(new Runnable() { @Override public void run() { new Handler().postDelayed(new Runnable(){ @Override public void run() { Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); } }, 4000); } });