Garmin 5X - Watchface background updates are no longer limited to 5 minutes

Hi, I am investigating a problem with Weathergraph's high battery use on Fenix 5X - a watchface updates weather in Background service's onTemporalEvent.

I noticed in server logs several 5X devices that query the forecast every few seconds instead of (at most) once in 5 minutes. This should be imposible, but it's happening, and it started recently - around a time of 10.50 according to a few users.

Could you investigate? I have a strong suspicion that 5X now disregards the 5 minute 'cooldown' for background service of watchface, and allows it to be scheduled as often as the app wants, with Background.registerForTemporalEvent(Time.now()).
  • There was a new beta for the f5x that came out yesterday, and the change log mentions "CIQ fixes". but maybe consider switching to registerForTemporalEvents() with a duration instead of a time? Set it to fire every x minutes and not a specific time. This will likely avoid the problem until it's found/fixed.

    I'm using a f5x with 10.20 (it came out a couple days ago), and that's working fine with a duration.
  • I see you updated your WF with a fix for this. Did you switch to using a duration, or was it something else?
  • Hi Jim, I don't really trust that it will reliably be called every 5 minutes (garmin sdk has broken the trust multiple times and it's always my app that looks bad), so I do it myself - saving a timestamp of a last invoke of bg service, and checking if it has been 5 minutes since.
  • Using a duration will work at least as well as using using a time. Are you re-registering in the WF or in the background? "Run Again in 5 minutes" before you exit the background... If it's in the main app, that could be delayed if you're not using the watch face, but in the widget loop (such as sitting on the music player for 10 minutes), for example.

    The way backgrounding works, is the temporal event will run "as soon as possible" after it's scheduled to run, but it can be delayed due to resources, such as another temporal event from an another app, or memory constraints. If for example you have a WF with a background you want to run every 5 minutes, but spent an hour in a CIQ device app, it might run during that hour, but will as soon as you exit the device app.
  • One thing to note is that if you are using a temporal event based on a moment with a watch app or a widget, restarting the app (exit and re-enter) you will be able to re-schedule a new temporal event as soon as you'd like. The startup code for apps and widgets resets the last run time.