In our app we have a feature of read mode and edit mode. When user starts editing something we start the idle timer by calling startWatching() and if the user is idle for specified seconds, we stop the timer with stopTimer() in subscribe callback and make it read mode. But when the user starts editing again we start the idle timer again with startWatching(). But now when the idle timeout happens the subscribe callback of startWatching() is called twice.
So if startWatching() is called n times, then n number of idle timer instances are created and all the subscribe callbacks are called.
It is expected that only 1 instance is available at any given time.
In our app we have a feature of read mode and edit mode. When user starts editing something we start the idle timer by calling startWatching() and if the user is idle for specified seconds, we stop the timer with stopTimer() in subscribe callback and make it read mode. But when the user starts editing again we start the idle timer again with startWatching(). But now when the idle timeout happens the subscribe callback of startWatching() is called twice.
So if startWatching() is called n times, then n number of idle timer instances are created and all the subscribe callbacks are called.
It is expected that only 1 instance is available at any given time.