Suggestion: "Run on background" as permission for data field

Former Member
Former Member
Most data field don't need to be active when not displayed on screen. I noticed however that at the moment the Connect IQ datafields is still active, even when it's in the background, using valuable resources.

Couldn't it be helpful to have a "Run on background" permission for a data field? This would make it possible to have more than 2 Connect IQ data fields in a profile, as long as they're not on the same page. (And it would probably also save battery.)
  • If you extended Activity.Info to include some information of the most immediate history - say the last 20-60 seconds - then even fewer data fields will need to run the background.
  • I've reported this for consideration. I don't know whether this has already been discussed or if there's a reason why this was not or cannot be implemented, so I think it's worth taking a look at. Thanks for the suggestion!
  • I have a datafield that counts the number of events based on a speed and time threshold (if >9 km/hr for longer than 4s then it is counted). But it only works when the datafield is visible. I assumed this was by design...but it sounds like it should be running in the background ??
  • Former Member
    Former Member over 10 years ago
    I have a datafield that counts the number of events based on a speed and time threshold (if >9 km/hr for longer than 4s then it is counted). But it only works when the datafield is visible. I assumed this was by design...but it sounds like it should be running in the background ??


    I would expect your data field to work if it's not visible. I would have to see the code to maybe understand why it's not. I have a data field in the store that shows the heart rate with the zone as a color on the background. While testing this data field I've build a version that added 1 to the heartrate each second and deployed that to the device. It just kept increasing the value while on the background (as expected of course).
  • But it only works when the datafield is visible.

    The DataField.compute() method should be getting called once a second, even when your field is not in the foreground (visible). If you have your calculation logic into onUpdate(), I'd expect to see the problem that you are seeing.
  • Indeed I do have it in onUpdate() ...thank you :) If I read the manual in more detail I would have seen that small detail about "When a View is active, onUpdate() is used to update dynamic content"
  • Former Member
    Former Member over 10 years ago
    Your data field does look great! I'm almost sad I don't surf.
  • Thank you TeunMo. Hopefully I can do an on-water test this weekend. There may not be too many surfers+920xt owners, but hopefully there is someone out there that can use it.