I have a small Android application that automatically clicks the button after 5 seconds. I have used performClick(); but this does not work. When the timer gets
performClick();
Use the runOnUiThread() method. This method run your method of UI thread
runOnUiThread()