settings on WatchFace not working

Dear all :-) ,

I've a bit strange behaviour. I try to give as much information as possible in this post - if it is too long please don't feel forced to answer ;-)

Backgound: I've created a little watchface with a specific color scheme. Now I want to make the color scheme configurable. I've used Menu2 to implement it:

class SettingsMenu extends WatchUi.Menu2


Then I have seen, that there is a possibility to create the same behaviour with a setting, but unfortunately I am not able to see the settings menu - neither on my watch, nor on the simulator

<resources>
    <properties>
        <property id="Theme" type="number">0</property>
    </properties>

    <settings>
        <setting propertyKey="@Properties.Theme" title="@Strings.Theme">
            <settingConfig type="list" required="true">
                <listEntry value="0">@Strings.ThemeDefault</listEntry>
                <listEntry value="1">@Strings.ThemeRed</listEntry>
                <listEntry value="2">@Strings.ThemeBlue</listEntry>
                <listEntry value="3">@Strings.ThemeGreen</listEntry>
                <listEntry value="4">@Strings.ThemeYellow</listEntry>
            </settingConfig>
        </setting>
    </settings>

    <strings>
        <string id="AppName">WatchOfTheRingsApp</string>
        <string id="Theme">Theme</string>
        <string id="ThemeDefault">Default</string>
        <string id="ThemeRed">Red</string>
        <string id="ThemeBlue">Blue</string>
        <string id="ThemeGreen">Green</string>
        <string id="ThemeYellow">Yellow</string>
    </strings>

</resources>

As reference here is the full source code for the implementation of the menu in monkey c (working):

patrickpl/WatchOfTheRings at da5085b5623b33fc6091fe6ad150b9b5791e1210

in <settings> (not working):

patrickpl/WatchOfTheRings at 57d5c870b2a5c3f3f75a72cf910334b080191f83

  • You are possibly conflating two different concepts here:

    - on-device settings, which are implemented by overriding getSettingsView() in your AppBase-derived class, for a watchface or data field. In this case, you implement your own View which handles all the display, entry, and persisting of settings on the watch itself.

    In the simulator, you would trigger these settings by selecting Settings > Trigger App Settings.

    On the watch, you would trigger these settings in a watchface by holding UP (and selecting the appropriate option - I think it's called Customize). For a data field, you would hold UP for the activity menu, select Connect IQ Fields, then select your data field.

    - settings defined in resources XML, which are visible in the Connect IQ mobile app or Garmin Express. In this case, the user is interacting with a settings UI displayed outside of your watch.

    These settings require your app to be uploaded to the store (you can upload as it beta if you don't want to wait for it to be approved and/or make it visible/available to other users). To view these settings in the simulator, press CTRL-P or select File > Edit Persistent storage > Edit Application Properties data. To view these settings outside of the simulator, you would use the Connect IQ app or Garmin Express.

    In this case, you define properties and settings in xml which determine how your settings are displayed in Connect IQ / Garmin Express, and how the corresponding properties are available to your app.

    Read more about these settings here: [https://developer.garmin.com/connect-iq/core-topics/properties-and-app-settings/]

    EDIT: or maybe your question is about how to translate on-device settings into "off-device" settings. Either way, everything above still applies.

    Furthermore, the commit at 57d5c870b2a5c3f3f75a72cf910334b080191f83 crashes when I try to run it, so I'm not able to test its settings in the sim. (Looks like it's unexpectedly reading a value of null for certain property)

  • You confuse "settings" that you can see/change in Garmin Connect mobile app (or Garmin Express) with on-device settings that you implement with Menu or Menu2. You only mentioned Menu2 in the question, with no other clue about it. All the rest is about the "classical" (non on-device) settings. You should be able to see it when you upload your app as a beta app and install it.

  • In this thread is a WF you can run in the sim that shows both types of settings.

    on-device allows you to turn on/off a leading zero for hours <10, while traditional app setting are used for colors

    https://forums.garmin.com/developer/connect-iq/f/discussion/349473/simple-example-wf-that-shows-a-bunch-of-things