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...

  • To expand on this answer, you have to implement your own view (such as a Menu2) which handles on-device settings - you are responsible for writing all the code for the UI and persisting settings. This view should be returned by getSettingsView(), which you would override in your app class. So unfortunately, you cannot somehow automatically "publish" your existing settings (defined in resource xml files) to an on-device settings screen, you have to manually write all the code yourself.

    onSettingsChanged() is not related to on-device settings - it is called when "off device settings" are changed via the Connect IQ phone app. "Off device settings" are the original kind of settings for CIQ apps, where you define settings in resource XML files, and they're presented in the Connect IQ phone app (and Garmin Express).

    For an example of the usage of getSettingsView(), look at the Analog SDK sample. In VS Code, open the command palette (CTRL-SHIFT-P / CMD-SHIFT-P) and select "Monkey C: Open Sample Folder".