Is possible detect user is inactive?

Hi guys,
I have question is lightning SDK or Core can detect user is not active anymore on the app? Like 30 minutes, and we can load the page ask them if they still looking?
I only see this _onActivated(page) on the documentation, from what I understand router only, I’m looking for on page event also.

Thank you

Hi,

Simple solution would be to add a timer setTimeout(AreYouStillWatching, 30Min) and reset the timeout on each _focusChange event (or _handleKey).

Alternatively, you can also see if the App is still being used -

Some of the solutions maybe platform specific and offer an event to let you know.

Chris

1 Like