Feature similar to Forest App

Hello, I am wondering if there is an existing feature or plugin that can track when users navigate away from the app, similar to the Forest App. I am building an app that helps users focus and concentrate on their tasks as long as the app is still open on their device. Any help or advice is greatly appreciated.


This plugin might help you!


This is perfect! Thank you so much for your help.