Complete

Simulator not changing setting, but keeps new settings as tmp file in TEMP folder

I am facing following behavior in the sim, any idea what can be causing this please ?

1.) Watchface starts OK in sim-> set files is created using default values from properties (Memory reports 74kB Memory peak and 380 objects peaks)
2.) Modifying settings using Connect IQ - App Settings editor in Eclipse
3.) Clicking Send Settings
4.) After some time new settings processing finishes, NO changes are reflected on watchface (Simulator reports Peak Memory 82.6kB and 569 peak objects)

In the file system TEMP directory where sim is pointed i can see new file  "temp_appsettings<multiple_random_digits>.tmp" has been created on same level as GARMIN folder, but set file has not been replaced with new data.
In rare occurrence new set file is created but has 0bytes size. Working SET file has 3.98kB

  • no, i am just reading API key and location from storage in background using Storage.getValue(). Saving data is done in  onBackgroundData(), i do just saving to storage again there no data manipulation in this function. Are there any other condition when set file gets deleted ? It looks like behavior on the watch is the same, when i change settings everything is reflected on the watch properly however at the moment i ll leave face to widgets or activity. Default settings are loaded, ..i assume because no set file was there at the moment of return.
  • in onBackgroundData are you trying to store the data in Properties vs Storage? Not sure how else the .set would be impacted.
  • Ok, so i reworked my watchface and my real peak memory usage is 88,8kB now in watchface with limit 92kB. However similar behavior still persist. I was able to determine that Simulator creates SET file and stores it to the Garmin/Apps/Settings folder on settings change, watchface reflects those changes without problem, however that file is deleted at the moment background task runs which is minutes later. Till that time all remains ok. It feels like i have some logic wrong but still cant figure it out. Background calls weather API, and returns approx 1kB of data, Available memory checks in background shows i have still 7kB free at the moment most of the memory is consumed (right before sending data from background). Not single error reported.
  • would be good if Connect IQ could let me know i am out of memory in case of settings change.
  • You are right. After changing watchface memory limit in devices xml to 124kB all started to work smoothly, having 94.4kB reported as a peak. Going to start another at least 3kB diet somewhere.