6

I have a timer in my application and want to reset it on user interaction.

I tried adding onTouchListener but it blocks my onClickListener.

Saeed Entezari
  • 3,685
  • 2
  • 19
  • 40
isha
  • 349
  • 2
  • 12

1 Answers1

20

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();
}
Community
  • 1
  • 1
isha
  • 349
  • 2
  • 12