@Override
public void onUserInteraction() {
Handler handler = new Handler();
handler.postDelayed(new Runnable () {
public void run() {
finish();
}
}, 5000);
handler.removeCallbacks(null);
}
I am trying to run the handler when the OnCreate method is called. I would then like to cancel the handler and call it again (restart the handler) when I receive user interaction.
How would I do this?
Thanks in advance