WatchFace and SetProperty questions

Former Member
Former Member
So I need to collect some heart rate data over a week to transmit over to a companion mobile app, and I was thinking of using a watchface app since it's constantly updating every minute or so. The plan was to ping the watch every 4 hours or so and accumulate a sort of heart rate average for the day like our client wants, and store it using Connect IQ's setProperty(), and then when I want to send it over to the mobile app, I'd simply get it using getProperty(), seven times for the past 7 days(Or however much currently exist). But I ran into some problems.

Maybe I'm just horribly inept at figuring this stuff out, but it seems Watch Faces don't have access to delegates/inputs/anything of that sort, after trying to get a watchface to print out basic strings based on input for the past few hours.

So I was thinking of just having a companion/side-app/widget to the watch face that will actually do the sending, getting the properties from the watch face app. But is that even possible? I use App.getApp().getProperty(), but that doesn't seem like it would be able to get another app's/watchface's properties, unless I'm wrong, in which case that would be great.

I'm not really sure what my other options here are, is there anything else other than a watchface that I could create that calls an update function fairly frequently? I imagine onUpdate works like that in general, but from what I've experienced it generally just goes back to the watchface after some period of inactivity.

Thanks
  • Just to confirm:

    Watch faces are very limited and you cannot do communication to it or from it to the outside world.
    No internet or any external sensors like ANT or any input with delegates are possible.
    Furthermore, no type of app can share data with another app on the device.
  • Ok.. Step one - read the programmer's guide in the SDK, and understand what the various types of apps can do. A watchface can only do very limited things (it's all about the battery!), Widgets are "quick view" things, that only run when you see them and on wearables, have a timeout where they shut down in somewhere between 10 sec and a couple minutes. At the time the widget runs, watchface stops running and V/V. Apps also can't share any data with each other, so the watchfaces can't generate data and the widget sends it (the watchface can onlt see the history)

    What you want is a watch-app that runs when it's showing, and can do the things it sounds like you are trying to do. BUT ONLY WHEN IT'S RUNNING in the foreground.

    Step two. Ok, so you are doing a watch-app. But what do you need for HR? Is the 24/7 reading fine and does the device have wrist based HR? (there a sample is saved every couple of minutes in the history, with a 4 hr history) If that's the case, that's already sent to Garmin Connect and you can see it without an app. If you want real time HR, then you have to enable the HR sensor (this will work with a HRM band or WHR)

    Step three. Say you now have the app collecting real time hr. Now it's just a matter of sending it to the companion app. Do you want to do that ASAP, or do you want to batch it, and maybe send it every hour?

    Notice that setProperty isn't involved at all, as you have the HR data and send it, unless you batch it and want to save it for your watch-app if the user exits your app, so it can be sent the next time it runs. (but then again, part of exiting the app could include sending the unsent HR data before it fully exits, so no save needed. If it's "ASAP" there's likely nothing to save and send later, so nothing to save at all.

    To add another variable to the mix, if the main thing you want is the real time HR, you could do a recording watch-app that generates a .fit, and that file has the real time HR data, which get's sent to GC when the app exits and can be read by anything that understands .fit files, and if that's all that's needed you might be able to just use something like a watch native "indoor walking" app, and use it's .fit file, and again, no app needed.