Values from properties.xml lost on GCM settings change

I was running into the IQ! error when changing settings with GCM and have now tracked it down to the the SDK returning null values for any properties not associated with a setting. Everything is fine immediately following an install or following a settings change with Garmin Express but as soon as I make a settings change with GCM the properties are null. For example, my properties.xml might look like this:

<properties>
<property id="HomeAerodrome" type="string" />
<property id="ShowMetarAge" type="boolean">false</property>
<property id="DisplayUnits" type="number">0</property>
<property id="AlwaysUseCelsius" type="boolean">true</property>
<property id="UseQnhHeader" type="number">0</property>
<property id="OnlyDisplayCeilingCloud" type="boolean">true</property>
<property id="GetPositionEachUse" type="boolean">false</property>

<property id="vwNumNearest" type="number">4</property>
<property id="vwStnX" type="number">30</property>
<property id="vwStnY" type="number">35</property>
</properties>


The first seven properties are all attached to user configurable settings and the last three properties are values I use to customize the view (hence the 'vw' prefix) and override these values in the resource files for other devices.

I reread the documentation and could find no reason not to do this, especially since I want these values to be overridden per device and since these are not user-editable values. Should I not be doing this? It seems odd that it works fine with Garmin Express but not with GCM.

Cheers,
Douglas
  • Former Member
    Former Member
    I sent you an email .. as I ran into what I think is this exact issue and took me over a month to figure out the issue. I will let the experts have their say .. as this is over my head as to what you can and cannot do.
  • I think it's important to clarify that I am not trying to define values to be stored in the Object Store (OS). None of the three 'vm' properties show up in the list when I use the Edit Object Store functionality in the simulator. These three values are compile-time values that I don't want hard-coded into the source; instead I want to utilize the resources functionality provided by CIQ to define values based on the device. For example, the "vwNumNearest" property is "4" is the device is a Fenix 3 because there's more room but for the Forerunners there is only room for three lines so the overridden value in the device-specific properties file is "3".

    After reading the documentation *again*, I noticed this:

    You can define a property as a default value and not define an associated setting but you cannot define a setting without tying it to a property.


    That is exactly what I have done. I have defined 7 properties that are tied to a setting and 3 properties with default values and no associated setting. I never try to change these values, I am treating them as read-only properties that can be overridden per device and/or per language in the same manner that you do with <string> entries. And, as I said, storing numeric properties in this manner works just fine until a user changes their settings with GCM.

    Furthermore, the fact that it works with Garmin Express but not GCM leads me to believe this is a bug. Or there is a way that you should separate the properties so that GCM doesn't get confused. Either way, this is not me confusing properties with the Object Store.

    Would love it if someone from Garmin (Brandon, Kyle, ??) could comment.

    Cheers,
    Douglas
  • *BUMP*

    Anyone? Any thoughts on this from anyone at Garmin?

    Cheers,
    Douglas
  • Former Member
    Former Member
    Hello, I've just realized same issue - what to do? My "read-only" properties are deleted when user change (different) property…… Any solution?