I have a timer in my application and want to reset it on user interaction.
I tried adding onTouchListener but it blocks my onClickListener.
See this link How to detect USER INACTIVITY in android
There is method available in android activity called onUserInteraction with the help of onUserInteraction method we can find the user-interaction with particular activity
@Override
public void onUserInteraction()
{
MyTimerClass.getInstance().resetTimer();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With