Show field app settings

So I have seen some datafields capable of changing the settings on the device (Garmin 1040). Made by others - Windfield is one of them.

The settings are shown by holding the finger on the datafield and then pressing the setting (gears) icons that appers - I can then select "ConnectIQ datafields" and then "Windfield".

How do I publish my settings to such a setting screen ?
I see there are some functions to implement in my datafield, like OnSettingsChanged() & GetSettings()

I've been looking around for an example with no luck...

  • (although you haven't really shown how settings are accessed - I assume there's some button on your full-screen data page.)

    Yes - you‘re right. It is described right at the beginning of the instructions:

    http://mcinner.at/files/GuideAllinOne_E.pdf

  • - not all CIQ watches support touch for data fields

    The OP saw this setting option on a Garmin Edge 1040. So, I assumed he is using one and it is maybe of interest…

    And I have to admit, I never think about watches because I only code for Edge devices Rofl

  • The OP saw this setting option on a Garmin Edge 1040. So, I assumed he is using one and it is maybe of interest…

    That's fair but my point still stands that your solution is really the same amount of work (or more) for you (the dev) as "real" on-device settings (accessed through the standard menu, giving you full control of the UI and full input capabilities in the settings view your app returns). It's only slightly more convenient for the user, but ofc it's much more limited (as it supports taps only [*]). And it's not a general solution for all devices.

    (* unless swipes work in a CIQ data field for Edge devices? I don't think they do, but I could be wrong. They def don't for watches)

    A *general* solution would be to use on-device settings, especially to support full input capabilities (especially on devices where touch is optional).

    And I have to admit, I never think about watches because I only code for Edge devices

    Fair enough. I rarely think about Edge devices tbh

  • That's fair but my point still stands that your solution is really the same amount of work (or more) for you (the dev) as "real" on-device settings (accessed through the standard menu, giving you full control of the UI in the settings view your app returns). It's only slightly more convenient for the user, but ofc it's much more limited (as it supports taps only [*]). And it's not a general solution for all devices.

    I‘m sure you‘re right!

    To be honest, when I coded my Quick Setting, I didn't know anything about the on-device settings standard menu. I actually only found out about it through this thread. I only started using Monkey C two years ago and am still learning.

    I've been using Edge devices longer as CIQ has been around. I don't even know how many years that's been, but I've never seen an IQ data field with this feature. I downloaded WindField to see it for the first time. Wink 

    So I've got another project to work on!

  • Well on-device settings did not launch with CIQ, which is why the term "settings" without qualification usually means "off-device settings" as I described them above (settings in Connect IQ app or Garmin Express), since the off-device settings came first.

    CIQ was launched in 2015.

    On device settings were introduced with CIQ 3.2, released in 2020: https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/connect-iq-3-2-now-available 

    I think there's a lot of devs (including myself) who didn't bother to add on-device settings to their data fields at the time, especially if the fields had to support old devices (which don't support on-device settings and probably wouldn't have enough memory for the settings view even if they did).

    There's also the fact that a lot of CIQ data fields (even very popular fields like Dozen Run) don't (or didn't) respond dynamically to settings changes - changes only take effect when the activity / data field starts up. So that's another (not great) reason to not support on-device settings - users would probably expect most or all on-device settings to take effect immediately.

    But again, if you developed a device app (or widget), you could have always implemented your own settings UI (same as you did for your data field), since there's no special constraints on user input for a device app (outside of the glance ofc), and a classic widget can accept any input once you press START / tap on the initial view and the app pushes a secondary view (aka the user "opens" the widget).

    The concept of on-device settings (as in getSettingsView()) only exists for relevant app types where input is severely constrained (i.e. data fields and watch faces).

  • I will also say that some devs (like myself) might be tempted to abuse on-device settings to provide a secondary view which isn't related to settings (like some sort of real-time status / stats). Unfortunately it isn't really possible to implement a stats/status view using on-device settings because - last time I checked - the settings view will not update in response to requestUpdate() (e.g. triggered by a timer). It only updates in response to user input.

    So you can use on-device settings to provide a settings view or even additional controls, but nothing that needs to update in real time without user intervention.