I am trying to make a timer that only times when the screen is turned on (user does not have to be in the app for the timer to time though). How would I go about doing this?
Cordova probably emits some events on switching off and on the screen, also for putting the app in background and foreground. You can listen to those and start/stop your timer.
1 Like