Watch Face settings not working

Former Member
Former Member
Hello Team,

I am creating my first watch face with user configurable settings. I have 3 sections for color changes and 1 for the "use24Hour" settings. Currently, while testing through the simulator, i am unable to get the settings to change to anything other than what they already are. Code is below:

WatchFace_Bacground.mc:
function draw(dc) {
// Set the background color then call to clear the screen
dc.setColor(Gfx.COLOR_TRANSPARENT, App.getApp().getProperty("ForegroundColor"));
dc.clear();
}

settings.xml:

<settings>

<setting propertyKey="@Properties.BackgroundColor" title="@Strings.BackgroundColorTitle">
<settingConfig type="list">
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
<listEntry value="0xAAAAAA">@Strings.ColorLightGray</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.ForegroundColor" title="@Strings.ForegroundColorTitle">
<settingConfig type="list">
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0x0066ff">@Strings.ColorBlue</listEntry>
<listEntry value="0xFF0000">@Strings.ColorRed</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
<listEntry value="0xAAAAAA">@Strings.ColorLightGray</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.SymbolColor" title="@Strings.SymbolColorTitle">
<settingConfig type="list">
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
<listEntry value="0xAAAAAA">@Strings.ColorLightGray</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x0066ff">@Strings.ColorBlue</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.UseMilitaryFormat" title="@Strings.MilitaryFormatTitle">
<settingConfig type="boolean" />
</setting>

</settings>


properties.xml:
<properties>

<property id="BackgroundColor" type="number">0xFFFFFF</property>
<property id="ForegroundColor" type="number">0xFFFFFF</property>
<property id="UseMilitaryFormat" type="boolean">true</property>
<property id="SymbolColor" type="number">0xFFFFFF</property>

</properties>


FaceView.mc:

View.onUpdate(dc);
var textColor = App.getApp().getProperty("ForegroundColor");
var symbColor = App.getApp().getProperty("SymbolColor");


What ends up happening is the background defaults to black if i set it as shown above (dc.setColor(Gfx.COLOR_TRANSPARENT, App.getApp().getProperty("ForegroundColor"));). However, if i change it to ForgroundColor is changes to RED and if i change it to SymbolColor it changes to Blue. I am not setting those colors in my code anywhere and no matter what i change the properties file to it does not impact any of the colors. I have seen some posts about this but still can't figure out why this does not work as expected. Also, if i side load this watch face, it looks closer to the real thing but due to the fact that i can't see the settings during a sideload i am unable to truly test all the functionality. Please help