User turning screen off and returns later doesn't seem to trigger onIdle #344
-
Hello! First of thanks a lot for the wonderful library. I'm wondering whether this library is meant to track idle status on users that:
From what I've seen, this doesn't seem to be the case? I've had users saying that they've still been signed in to the app in the morning. Appreciate any ideas of the best way of implementing this if not supported, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The timer should log you out if you have been idle longer than the timeout value, but it would require user input in order to trigger it. If we wanted something a little more robust we could use a timeout to incrementally check the last idle time against the current time, though I would have to measure the performance impacts. I will test it out for the next release. In the mean time it should be too hard to implement yourself using if (+new Date() - idleTimer.getLastActiveTime() > props.timeout) {
idleTimer.pause()
onIdle()
} |
Beta Was this translation helpful? Give feedback.
The timer should log you out if you have been idle longer than the timeout value, but it would require user input in order to trigger it. If we wanted something a little more robust we could use a timeout to incrementally check the last idle time against the current time, though I would have to measure the performance impacts. I will test it out for the next release. In the mean time it should be too hard to implement yourself using
getLastActiveTime()
andnew Date().getTime()
: