Can I make an app that alerts the user of the time to review?

In the meantime, here’s the algorithm I was going to try.

The idea is that the appTime is a countup timer (which is why I need it to work properly) that gets reset to 0 every time the app is opened. The elapsedTime is the difference between the number of seconds since 1970 and the startTime (which gets set at first run).

If the app was just opened/re-opened, appTime should be zero and we check to see if the elapsedTime is greater than zero (which means the app was re-opened instead of opened for the first time; I guess I could also check the first run boolean value…). If it is, then we use the elapsedTime as the background duration that we’re looking for. That is, the amount of time in seconds that the app has been in the background before being re-opened.

1 Like