How do timer triggers work when a device is inactive?

Correct me if I’m wrong, but timer triggers do not fire when the device is not active? In the scenario where users “re-activate” their devices, how do timer triggers respond? Does the timer trigger start counting from 0, where it previously ended, or calculate the total elapsed time since the device become inactive?

Main use case for me right now is to update records as employees re-open their devices.
We use iPads to use check sheet applications. Very much like its paper counterpart, the check sheet is not accessed continuously and is often only referenced for a few seconds at a time (to fill in a few check items or to reference the current check being worked on). I want to use a timer trigger to save work time in intervals of 1 minute or whenever their device becomes active again, which will update the aggregation that shows total time of process.

Will setting a timer trigger work for this scenario? Or will the timer trigger never fire unless the user stays on that step for the allotted interval before de-activating their device?

Related. Great minds get confused alike!

1 Like

Hi @dsun, hi @danielpomeranz

what I figured out by experience:

  • timer based triggers will pause, when the app is paused, or the player is closed (inactive App)
    • timer triggers will not fire
  • when the App is reactivated, the step is opened, reopened… the timer actually starts at 0
  • App Started triggers, will only fire with the initial start, but not with a re-activation
  • there are possible workarounds, to recognize a re-activation (but I don’t have a brilliant one yet)

Here is one possible workaround, that might work on some use cases:

  • choose a checking interval that fits your needs (reactivations in a shorter timespan will not be recognized)

  • make a timer fires trigger on that interval and build something like that:

  • Save the current Date and Time in the last_date variable on App Started Trigger, to catch the initial opening…

2 Likes

Hi @thorsten.langner and @danielpomeranz,

As long as the computer is awake and the player is actively running, then timers should continue to fire. The moment player is closed or the computer goes to sleep, then timers would stop (as would the rest of the application).

For example, if you close the Tulip player and re-open it, the timer will reset.

Example: 60 second timer, close player app at 30 seconds and re-open, will wait another 60 seconds for it to fire

Instead if the computer goes to sleep, it pauses the timer instead. So when the computer wakes up, it will resume as if no time has passed.

Example: 60 second timer, computer sleeps at 30 seconds, 30 minutes later, you wake the computer up, timer will fire in 30 seconds.

@jakerigos

Might be a stupid question but I wanted to check what happens when someone changes applications on an iPad? Does the timer restart because the player was not officially closed? Or does Tulip Player treat an application switch as closing the app?

Hi David,

Not a silly question!

On iOS and iPadOS the app is “suspended” when it goes to the background, so it should have the same behavior as Jake stated above!

As a side note, on Android, the app will continue to run in the background until the Android OS decides to kill or suspend the app at some non-deterministic time. This could be from memory or cpu pressure, aging or other android version or OEM specific heuristic.